From: Po Lu Date: Wed, 15 Dec 2021 02:27:27 +0000 (+0800) Subject: Work around pixel scrolling issues when line numbers are displayed X-Git-Tag: emacs-29.0.90~3593^2~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=861eee42418f510679a6e3ae1ee433353194cb68;p=emacs.git Work around pixel scrolling issues when line numbers are displayed * lisp/pixel-scroll.el (pixel-point-and-height-at-unseen-line): Compare start position against line number display width instead. --- diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 142ebf9c65a..fa0185b16e9 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -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)