From 24b5026fb6b622966fd773178608617fa2f8add2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 11 Dec 2018 12:32:11 +0200 Subject: [PATCH] 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) --- src/window.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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; } -- 2.39.2