mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-30 04:10:54 -08:00
Fix pixel scrolling upwards in Info buffers
* lisp/pixel-scroll.el (pixel-point-and-height-at-unseen-line): Don't blindly trust window start to be the beginning of a visual line.
This commit is contained in:
parent
e8d90a3fd4
commit
2e4740f042
1 changed files with 5 additions and 3 deletions
|
|
@ -397,7 +397,10 @@ returns nil."
|
|||
The returned value is a cons of the position of the first
|
||||
character on the unseen line just above the scope of current
|
||||
window, and the pixel height of that line."
|
||||
(let* ((pos0 (window-start))
|
||||
(let* ((pos0 (save-excursion
|
||||
(goto-char (window-start))
|
||||
(beginning-of-visual-line)
|
||||
(point)))
|
||||
(vscroll0 (window-vscroll nil t))
|
||||
(line-height nil)
|
||||
(pos
|
||||
|
|
@ -407,8 +410,7 @@ window, and the pixel height of that line."
|
|||
(point-min)
|
||||
(vertical-motion -1)
|
||||
(setq line-height
|
||||
(cdr (window-text-pixel-size nil (point)
|
||||
pos0)))
|
||||
(cdr (window-text-pixel-size nil (point) pos0)))
|
||||
(point)))))
|
||||
;; restore initial position
|
||||
(set-window-start nil pos0 t)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue