Subject: Re: bug#8355: 24.0.50; Boxes in mode-line and scrolling

From: Eli Zaretskii <[email-masked]>
Date: Mon, 14 Dec 2020 20:26:23 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Wed, 09 Dec 2020 18:24:35 +0100
> 
> (defun make-buffer ()
>   (switch-to-buffer "*images*")
>   (erase-buffer)
>   (let ((height (* (frame-pixel-height) 0.6))
> 	(width (* (frame-pixel-width) 0.7)))
>     (dotimes (i 10)
>       (let ((svg (svg-create width height)))
> 	(svg-rectangle svg 0 0 width height
> 		       :fill (format "#%02x%02x%02x"
> 				     (random 255)
> 				     (random 255)
> 				     (random 255)))
> 	(svg-text svg (format "Image %d" i)
> 		  :font-size 50
> 		  :fill "black"
> 		  :font-weight "bold"
> 		  :x (/ width 2)
> 		  :y (/ height 2)
> 		  :text-anchor "middle")
> 	(insert-image (svg-image svg :scale 1))
> 	(insert (format "\n\nImage %d\n\n" i))))))
> 
> Scroll downwards to the test "Image 4", for instance.  This is what I
> have in my window then:
> 
> So we see the entirety of Image 4, and the top of Image 5, and that's
> fine.  Then hit `M-v':
> 
> We see the entirety of image 2, and the top of image 3, which seems like
> we've overshot -- I'd expect to see the entirety of image 3, and the top
> of image 4.
> 
> Then C-v:
> 
> We're not back to where we started, but instead have the entirety of
> image 3, and the top of image 4 (which is what I'd expect when C-v-ing
> from where I was).
> 
> So I think Emacs behaves very nicely when C-v-ing down a buffer of large
> images, but when M-v-ing back up, it seems to scroll too far.

Thanks, this should now be fixed on the master branch.