summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2021-11-27 14:10:49 +0800
committerPo Lu <luangruo@yahoo.com>2021-11-27 14:10:49 +0800
commit3dc9eb8bbd977b0d81d49c7b79492f6ef30e270f (patch)
tree55482459ceb085d718846cefc8c79555f6233daa /lisp
parent141425ce3b8646d589f6a3aaf16d981821b32631 (diff)
downloademacs-3dc9eb8bbd977b0d81d49c7b79492f6ef30e270f.tar.gz
emacs-3dc9eb8bbd977b0d81d49c7b79492f6ef30e270f.tar.bz2
emacs-3dc9eb8bbd977b0d81d49c7b79492f6ef30e270f.zip
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'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/pixel-scroll.el11
1 files changed, 3 insertions, 8 deletions
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)