]> git.eshelyaron.com Git - emacs.git/commitdiff
Work around pixel scrolling issues when line numbers are displayed
authorPo Lu <luangruo@yahoo.com>
Wed, 15 Dec 2021 02:27:27 +0000 (10:27 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 15 Dec 2021 02:27:27 +0000 (10:27 +0800)
* lisp/pixel-scroll.el (pixel-point-and-height-at-unseen-line):
Compare start position against line number display width
instead.

lisp/pixel-scroll.el

index 142ebf9c65ab9dfcdc202f96e6202f7b5d5fe4db..fa0185b16e9bc83d8ae4e4c3ab5dadddaa7a7398 100644 (file)
@@ -417,7 +417,8 @@ window, and the pixel height of that line."
     (set-window-start nil pos0 t)
     (set-window-vscroll nil vscroll0 t)
     (when (and line-height
-               (> (car (posn-x-y (posn-at-point pos0))) 0))
+               (> (car (posn-x-y (posn-at-point pos0)))
+                  (line-number-display-width t)))
       (setq line-height (- line-height
                            (save-excursion
                              (goto-char pos0)