From: Po Lu Date: Sat, 27 Nov 2021 06:10:49 +0000 (+0800) Subject: Remove GC prone call in `pixel-point-and-height-at-unseen-line' X-Git-Tag: emacs-29.0.90~3649^2~27 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3dc9eb8bbd977b0d81d49c7b79492f6ef30e270f;p=emacs.git Remove GC prone call in `pixel-point-and-height-at-unseen-line' * lisp/pixel-scroll.el (pixel-point-and-height-at-unseen-line): Remove call to unnecessary call to `beginning-of-visual-line'. --- diff --git a/lisp/pixel-scroll.el b/lisp/pixel-scroll.el index 84e1f66fa55..92f66c89cef 100644 --- a/lisp/pixel-scroll.el +++ b/lisp/pixel-scroll.el @@ -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)