bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Lars Ingebrigtsen
Subject: bug#8355: 24.0.50; Boxes in mode-line and scrolling
Date: Wed, 09 Dec 2020 18:24:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> Yes, please.

This one should illustrate the problem, I think:

(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:

PNG image

So we see the entirety of Image 4, and the top of Image 5, and that's
fine.  Then hit `M-v':

PNG image

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:

PNG image

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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

[Prev in Thread] Current Thread [Next in Thread]