emacs-diffs
[Top][All Lists]
Advanced

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

master 59db96d: Fix bob detection when pixel scrolling upwards


From: Po Lu
Subject: master 59db96d: Fix bob detection when pixel scrolling upwards
Date: Thu, 9 Dec 2021 22:30:40 -0500 (EST)

branch: master
commit 59db96d83ae837b3a3d82a979cd97a271bcd86bf
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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.
---
 lisp/pixel-scroll.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index 432a5dc..29d8e7e 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)



reply via email to

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