Subject: Re: bug#74876: 31.0.50; Force fringe refresh / force-window-update not affecting fringes

From: Eli Zaretskii <[email-masked]>
Date: Sun, 15 Dec 2024 09:06:55 +0200

> From: Michal Nazarewicz <[email-masked]>
> Cc: [email-masked]
> Date: Sat, 14 Dec 2024 22:39:19 +0100
> 
> 1. Open two windows with two long buffers.
> 2. M-x adob-test-on RET
> 3. Scroll current window with M-v.
> 4. Switch to the other window with C-x o.
> 4. Scroll other window with C-M-v.
> 
> Expected: at all times, the fringes of the selected window are red while
> fringes of the other window are grey.
> 
> Observed: Fringes are updated only when window is scrolled and new lines
> are shown.

Thanks.  I don't think what you want can possibly work, unless we
completely redesign how the fringes are updated.  The current design
is that we update the fringes only on the screen lines where redisplay
changed something.  Since redisplay goes out of its way to try not to
redraw screen lines that don't need redrawing, this means that you
cannot reliably force the entire fringe of a window to be redrawn,
unless you (almost) completely change what is shown in the window.
You can see this if, for example, after step 1 you move the cursor
with C-n until point goes out of the window and Emacs scrolls and
recenters the window: only the lower half of the window gets its
fringes displayed in the red color.  That's because the upper part was
not redrawn, just scrolled on the screen.

Sorry.