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

Minor redisplay optimisations

* src/frame.c (Ficonify_frame): No need to redisplay everything.

* src/xdisp.c (overlay_arrows_changed_p): Add `set_redisplay' argument.
(redisplay_internal): Use it to avoid redisplaying everything.
(try_window_id): Use it keep the same behavior as before.
parent 407e6504
...@@ -2156,9 +2156,6 @@ If omitted, FRAME defaults to the currently selected frame. */) ...@@ -2156,9 +2156,6 @@ If omitted, FRAME defaults to the currently selected frame. */)
#endif #endif
} }
/* Make menu bar update for the Buffers and Frames menus. */
windows_or_buffers_changed = 17;
return Qnil; return Qnil;
} }
......
...@@ -13336,7 +13336,7 @@ overlay_arrow_in_current_buffer_p (void) ...@@ -13336,7 +13336,7 @@ overlay_arrow_in_current_buffer_p (void)
has changed. */ has changed. */
   
static bool static bool
overlay_arrows_changed_p (void) overlay_arrows_changed_p (bool set_redisplay)
{ {
Lisp_Object vlist; Lisp_Object vlist;
   
...@@ -13356,8 +13356,13 @@ overlay_arrows_changed_p (void) ...@@ -13356,8 +13356,13 @@ overlay_arrows_changed_p (void)
Fget (var, Qlast_arrow_position)) Fget (var, Qlast_arrow_position))
|| ! (pstr = overlay_arrow_string_or_property (var), || ! (pstr = overlay_arrow_string_or_property (var),
EQ (pstr, Fget (var, Qlast_arrow_string)))) EQ (pstr, Fget (var, Qlast_arrow_string))))
{
if (set_redisplay)
bset_redisplay (XMARKER (val)->buffer);
else
return true; return true;
} }
}
return false; return false;
} }
   
...@@ -13781,10 +13786,9 @@ redisplay_internal (void) ...@@ -13781,10 +13786,9 @@ redisplay_internal (void)
   
/* If specs for an arrow have changed, do thorough redisplay /* If specs for an arrow have changed, do thorough redisplay
to ensure we remove any arrow that should no longer exist. */ to ensure we remove any arrow that should no longer exist. */
if (overlay_arrows_changed_p ())
/* Apparently, this is the only case where we update other windows, /* Apparently, this is the only case where we update other windows,
without updating other mode-lines. */ without updating other mode-lines. */
windows_or_buffers_changed = 49; overlay_arrows_changed_p (true);
   
consider_all_windows_p = (update_mode_lines consider_all_windows_p = (update_mode_lines
|| windows_or_buffers_changed); || windows_or_buffers_changed);
...@@ -18282,7 +18286,7 @@ try_window_id (struct window *w) ...@@ -18282,7 +18286,7 @@ try_window_id (struct window *w)
   
/* Can't use this if overlay arrow position and/or string have /* Can't use this if overlay arrow position and/or string have
changed. */ changed. */
if (overlay_arrows_changed_p ()) if (overlay_arrows_changed_p (false))
GIVE_UP (12); GIVE_UP (12);
   
/* When word-wrap is on, adding a space to the first word of a /* When word-wrap is on, adding a space to the first word of a
......
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