[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 2f66010: Work around pixel scrolling issues when org-indent-mode
From: |
Po Lu |
Subject: |
master 2f66010: Work around pixel scrolling issues when org-indent-mode is on |
Date: |
Sun, 12 Dec 2021 21:00:42 -0500 (EST) |
branch: master
commit 2f6601054940e698184f4c9c60a47c16e5baa880
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Work around pixel scrolling issues when org-indent-mode is on
* lisp/pixel-scroll.el (pixel-point-and-height-at-unseen-line):
Subtract line height of window start when it doesn't appear
at the 0th pixel of the line.
---
lisp/pixel-scroll.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el
index 0e22ef2..142ebf9 100644
--- a/lisp/pixel-scroll.el
+++ b/lisp/pixel-scroll.el
@@ -416,6 +416,12 @@ window, and the pixel height of that line."
;; restore initial position
(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))
+ (setq line-height (- line-height
+ (save-excursion
+ (goto-char pos0)
+ (line-pixel-height)))))
(cons pos line-height)))
(defun pixel-point-at-unseen-line ()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 2f66010: Work around pixel scrolling issues when org-indent-mode is on,
Po Lu <=