From: Eli Zaretskii Date: Tue, 11 Dec 2018 10:32:11 +0000 (+0200) Subject: Fix redisplay when a window's scroll bar or fringes are changed X-Git-Tag: emacs-26.1.91~45 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=24b5026fb6b622966fd773178608617fa2f8add2;p=emacs.git Fix redisplay when a window's scroll bar or fringes are changed * src/window.c (set_window_fringes, set_window_scroll_bars): Set windows_or_buffers_changed flag to cause immediate thorough redisplay of a window when scroll bars or fringes are changed. (Bug#33694) --- diff --git a/src/window.c b/src/window.c index 5d99098cba1..6026313e5a4 100644 --- a/src/window.c +++ b/src/window.c @@ -7137,6 +7137,11 @@ set_window_fringes (struct window *w, Lisp_Object left_width, w->right_fringe_width = right; w->fringes_outside_margins = outside; + /* This is needed to trigger immediate redisplay of the window + when its fringes are changed, because fringes are redrawn + only if update_window is called, so we must trigger that even + if the window's glyph matrices did not change at all. */ + windows_or_buffers_changed = 35; return w; } else @@ -7254,6 +7259,12 @@ set_window_scroll_bars (struct window *w, Lisp_Object width, wset_horizontal_scroll_bar_type (w, Qnil); #endif + /* This is needed to trigger immediate redisplay of the window when + scroll bars are changed, because scroll bars are redisplayed only + if more than a single window needs to be considered, see + redisplay_internal. */ + if (changed) + windows_or_buffers_changed = 31; return changed ? w : NULL; }