aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2021-12-10 11:30:07 +0800
committerPo Lu2021-12-10 11:30:07 +0800
commit59db96d83ae837b3a3d82a979cd97a271bcd86bf (patch)
treed22a3594b1e9d3d6af899ed5862aefb6dd34541f
parent2e4740f04239ee441685b2f43d156efcf6359383 (diff)
downloademacs-59db96d83ae837b3a3d82a979cd97a271bcd86bf.tar.gz
emacs-59db96d83ae837b3a3d82a979cd97a271bcd86bf.zip
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.
-rw-r--r--lisp/pixel-scroll.el3
1 files changed, 2 insertions, 1 deletions
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
399window, and the pixel height of that line." 399window, and the pixel height of that line."
400 (let* ((pos0 (save-excursion 400 (let* ((pos0 (save-excursion
401 (goto-char (window-start)) 401 (goto-char (window-start))
402 (beginning-of-visual-line) 402 (unless (bobp)
403 (beginning-of-visual-line))
403 (point))) 404 (point)))
404 (vscroll0 (window-vscroll nil t)) 405 (vscroll0 (window-vscroll nil t))
405 (line-height nil) 406 (line-height nil)