From: Po Lu Date: Fri, 10 Dec 2021 03:30:07 +0000 (+0800) Subject: Fix bob detection when pixel scrolling upwards X-Git-Tag: emacs-29.0.90~3606^2~3 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=59db96d83ae837b3a3d82a979cd97a271bcd86bf;p=emacs.git Fix bob detection when pixel scrolling upwards * lisp/pixel-scroll.el (pixel-point-and-height-at-unseen-line): Don't go to the beginning-of-visual-line if bobp. --- diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 432a5dc52cf..29d8e7e0255 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -399,7 +399,8 @@ character on the unseen line just above the scope of current window, and the pixel height of that line." (let* ((pos0 (save-excursion (goto-char (window-start)) - (beginning-of-visual-line) + (unless (bobp) + (beginning-of-visual-line)) (point))) (vscroll0 (window-vscroll nil t)) (line-height nil)