Subject: Re: bug#42406: Mouse-wheel scrolling can be flickering

From: martin rudalics <[email-masked]>
Date: Thu, 17 Dec 2020 14:21:48 +0100

> Thanks! This did the job. Is there a way to exactly test whether the
 > (now) three out-commenting of wset_update_mode_line are really as
 > harmless at they appear? Could there be other scrolling problems, say
 > by scrolling via keys?

First of all I would replace these

   wset_update_mode_line (w);

with

   w->update_mode_line = true;

This way you make sure that the mode line does get updated whenever the
scrolled window is on the selected frame.  Then problems should occur
only when you either use the mouse wheel or the scroll bar on a
non-selected frame.  In that case, the line number of the associated
window might not get updated until its frame gets selected.

The (IMHO) right fix would be to have wset_update_mode_line add the
frame containing the scrolled window to a list of frames the next
redisplay should investigate.  This might still fail when say frame A is
selected, a window on frame B was scrolled and the title format of frame
C wants to display the line number of that window.  I wouldn't care
about such pathological cases but maybe someone does.

martin