mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Make pixel scrolling through images at the first line smoother
* lisp/better-pixel-scroll.el (better-pixel-scroll-scroll-up): Try to reset vscroll if already vscrolled.
This commit is contained in:
parent
fc8b87d904
commit
897a101cd3
1 changed files with 4 additions and 3 deletions
|
|
@ -88,10 +88,11 @@ the height of the current window."
|
|||
(current-y (+ (cdr (posn-x-y posn))
|
||||
(cdr (posn-object-width-height posn)))))
|
||||
(while (< (- max-y current-y) delta)
|
||||
(when (zerop (vertical-motion -1))
|
||||
(set-window-vscroll nil 0)
|
||||
(signal 'beginning-of-buffer nil))
|
||||
(vertical-motion -1)
|
||||
(setq current-y (- current-y (line-pixel-height)))))
|
||||
(let ((current-vscroll (window-vscroll nil t)))
|
||||
(setq delta (- delta current-vscroll))
|
||||
(set-window-vscroll nil 0 t))
|
||||
(while (> delta 0)
|
||||
(set-window-start nil (save-excursion
|
||||
(goto-char (window-start))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue