Make `pixel-scroll-precision-scroll-up' work better with overlays
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-up): Just set vscroll when on overlay.
This commit is contained in:
parent
338f780237
commit
3c2afa66a2
1 changed files with 8 additions and 3 deletions
|
@ -456,9 +456,14 @@ the height of the current window."
|
|||
(window-header-line-height))))
|
||||
(desired-start (posn-point desired-pos))
|
||||
(desired-vscroll (cdr (posn-object-x-y desired-pos))))
|
||||
(unless (eq (window-start) desired-start)
|
||||
(set-window-start nil desired-start t))
|
||||
(set-window-vscroll nil desired-vscroll t))))))
|
||||
(let ((object (posn-object desired-pos)))
|
||||
(if (or (consp object) (stringp object))
|
||||
(set-window-vscroll nil (+ (window-vscroll nil t)
|
||||
(- delta))
|
||||
t)
|
||||
(unless (eq (window-start) desired-start)
|
||||
(set-window-start nil desired-start t))
|
||||
(set-window-vscroll nil desired-vscroll t))))))))
|
||||
|
||||
;; FIXME: This doesn't work when there's an image above the current
|
||||
;; line that is taller than the window.
|
||||
|
|
Loading…
Add table
Reference in a new issue