Commit a8253776 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* src/xdisp.c (REDISPLAY_SOME_P): New macro.

(redisplay_internal): Use it.
(prepare_menu_bars, redisplay_window): Use it as well.

Fixes: debbugs:15999
parent e0ba1308
2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca> 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
* xdisp.c (REDISPLAY_SOME_P): New macro.
(redisplay_internal): Use it (bug#15999).
(prepare_menu_bars, redisplay_window): Use it as well.
* lisp.mk (lisp): Add electric.elc. * lisp.mk (lisp): Add electric.elc.
2013-11-29 Tom Seddon <emacs@tomseddon.plus.com> (tiny change) 2013-11-29 Tom Seddon <emacs@tomseddon.plus.com> (tiny change)
......
...@@ -2870,8 +2870,8 @@ init_iterator (struct it *it, struct window *w, ...@@ -2870,8 +2870,8 @@ init_iterator (struct it *it, struct window *w,
} }
else else
{ {
it->first_visible_x = it->first_visible_x
window_hscroll_limited (it->w, it->f) * FRAME_COLUMN_WIDTH (it->f); = window_hscroll_limited (it->w, it->f) * FRAME_COLUMN_WIDTH (it->f);
it->last_visible_x = (it->first_visible_x it->last_visible_x = (it->first_visible_x
+ window_box_width (w, TEXT_AREA)); + window_box_width (w, TEXT_AREA));
   
...@@ -11198,6 +11198,12 @@ x_consider_frame_title (Lisp_Object frame) ...@@ -11198,6 +11198,12 @@ x_consider_frame_title (Lisp_Object frame)
Menu Bars Menu Bars
***********************************************************************/ ***********************************************************************/
   
/* Non-zero if we will not redisplay all visible windows. */
#define REDISPLAY_SOME_P() \
((windows_or_buffers_changed == 0 \
|| windows_or_buffers_changed == REDISPLAY_SOME) \
&& (update_mode_lines == 0 \
|| update_mode_lines == REDISPLAY_SOME))
   
/* Prepare for redisplay by updating menu-bar item lists when /* Prepare for redisplay by updating menu-bar item lists when
appropriate. This can call eval. */ appropriate. This can call eval. */
...@@ -11206,10 +11212,7 @@ static void ...@@ -11206,10 +11212,7 @@ static void
prepare_menu_bars (void) prepare_menu_bars (void)
{ {
bool all_windows = windows_or_buffers_changed || update_mode_lines; bool all_windows = windows_or_buffers_changed || update_mode_lines;
bool some_windows = ((windows_or_buffers_changed == 0 bool some_windows = REDISPLAY_SOME_P ();
|| windows_or_buffers_changed == REDISPLAY_SOME)
&& (update_mode_lines == 0
|| update_mode_lines == REDISPLAY_SOME));
struct gcpro gcpro1, gcpro2; struct gcpro gcpro1, gcpro2;
Lisp_Object tooltip_frame; Lisp_Object tooltip_frame;
   
...@@ -13414,7 +13417,7 @@ redisplay_internal (void) ...@@ -13414,7 +13417,7 @@ redisplay_internal (void)
{ {
bool gcscrollbars bool gcscrollbars
/* Only GC scollbars when we redisplay the whole frame. */ /* Only GC scollbars when we redisplay the whole frame. */
= f->redisplay || windows_or_buffers_changed != REDISPLAY_SOME; = f->redisplay || !REDISPLAY_SOME_P ();
/* Mark all the scroll bars to be removed; we'll redeem /* Mark all the scroll bars to be removed; we'll redeem
the ones we want when we redisplay their windows. */ the ones we want when we redisplay their windows. */
if (gcscrollbars && FRAME_TERMINAL (f)->condemn_scroll_bars_hook) if (gcscrollbars && FRAME_TERMINAL (f)->condemn_scroll_bars_hook)
...@@ -15409,10 +15412,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) ...@@ -15409,10 +15412,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p)
#endif #endif
   
if (!just_this_one_p if (!just_this_one_p
&& (update_mode_lines == REDISPLAY_SOME && REDISPLAY_SOME_P ()
|| update_mode_lines == 0)
&& (windows_or_buffers_changed == REDISPLAY_SOME
|| windows_or_buffers_changed == 0)
&& !w->redisplay && !w->redisplay
&& !f->redisplay && !f->redisplay
&& !buffer->text->redisplay) && !buffer->text->redisplay)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment