Subject: bug#70038: 29.3.50; Shift up/down in buffer with images on M-x other-window with some fonts

From: Eli Zaretskii <[email-masked]>
Date: Thu, 28 Mar 2024 10:36:49 +0200

> From: Rahguzar <[email-masked]>
> Cc: Ramon Diaz-Uriarte <[email-masked]>, [email-masked]
> Date: Thu, 28 Mar 2024 08:52:21 +0100
> 
> The original problem where we encountered this the cursor wasn't shown
> at all. So I think this might be different. I have been unable to
> reproduce it on my machine (it might be because pgtk build doesn't have
> this problem) but from what I can tell the problem is that when the
> window is not selected the vscroll gets reset to 0 and trying to set it
> again seems to have no effect.
> 
> In the minimal reproducer there is a pre-redisplay-function that always
> sets vscroll for the window to 200. When the window is deselected, the
> function runs and Ramon checked by inserting a message that the vscroll
> gets reported to be non-zero however the window gets drawn as if the
> vscroll was 0. On selecting the window again, it gets redrawn with the
> expected value of rescroll and this causes the jumps.

In that case, I don't understand what the font has to do with this: if
redisplay resets the window's vscroll, it should always do that, no?
Also, I don't have the fonts you used, so I cannot try the recipe as
is.  I tried a few monospaced fonts I do have, and couldn't reproduce.
A recipe that doesn't depend on rare fonts would be appreciated.
Bonus points for providing a recipe that doesn't depend on fonts at
all.

Thanks.