]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove GC prone call in `pixel-point-and-height-at-unseen-line'
authorPo Lu <luangruo@yahoo.com>
Sat, 27 Nov 2021 06:10:49 +0000 (14:10 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 27 Nov 2021 06:10:49 +0000 (14:10 +0800)
* lisp/pixel-scroll.el (pixel-point-and-height-at-unseen-line):
Remove call to unnecessary call to `beginning-of-visual-line'.

lisp/pixel-scroll.el

index 84e1f66fa55ff1638d4ab18eb0553ab8effbee2f..92f66c89cef0d46a93073654695611a63c83124a 100644 (file)
@@ -346,14 +346,9 @@ window, and the pixel height of that line."
             (goto-char pos0)
             (if (bobp)
                 (point-min)
-              ;; When there's an overlay string at window-start,
-              ;; (beginning-of-visual-line 0) stays put.
-              (let ((ppos (point))
-                    (tem (beginning-of-visual-line 0)))
-                (if (eq tem ppos)
-                    (vertical-motion -1))
-                (setq line-height (line-pixel-height))
-                (point))))))
+              (vertical-motion -1)
+              (setq line-height (line-pixel-height))
+              (point)))))
     ;; restore initial position
     (set-window-start nil pos0 t)
     (set-window-vscroll nil vscroll0 t)