mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 18:41:25 -08:00
Allow precision-scrolling nonselected windows when the minibuffer is resized
* doc/lispref/windows.texi (Vertical Scrolling): Document new `preserve-vscroll-p' parameter of `set-window-vscroll'. * etc/NEWS: Announce new parameter. * lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down-page) (pixel-scroll-precision-scroll-up-page): Use that parameter when setting the vscroll. * src/window.c (window_scroll_pixel_based, Fset_window_vscroll): Adjust for new parameter. * src/window.h (struct window): New flag `preserve_vscroll_p'. * src/xdisp.c (redisplay_window): Preserve the vscroll inside force_start on frozen windows with that flag set. (bug#55312)
This commit is contained in:
parent
3d846efb85
commit
fd8eaa72a6
6 changed files with 43 additions and 12 deletions
|
|
@ -547,7 +547,7 @@ the height of the current window."
|
|||
(beginning-of-visual-line)
|
||||
(point)))
|
||||
t)
|
||||
(set-window-vscroll nil desired-vscroll t)))
|
||||
(set-window-vscroll nil desired-vscroll t t)))
|
||||
|
||||
(defun pixel-scroll-precision-scroll-down (delta)
|
||||
"Scroll the current window down by DELTA pixels."
|
||||
|
|
@ -586,7 +586,7 @@ the height of the current window."
|
|||
(goto-char up-point)))
|
||||
(let ((current-vscroll (window-vscroll nil t)))
|
||||
(setq delta (- delta current-vscroll))
|
||||
(set-window-vscroll nil 0 t)
|
||||
(set-window-vscroll nil 0 t t)
|
||||
(when (> delta 0)
|
||||
(let* ((start (window-start))
|
||||
(dims (window-text-pixel-size nil (cons start (- delta))
|
||||
|
|
@ -602,7 +602,7 @@ the height of the current window."
|
|||
(signal 'beginning-of-buffer nil))
|
||||
(setq delta (- delta height))))
|
||||
(when (< delta 0)
|
||||
(set-window-vscroll nil (- delta) t)))))
|
||||
(set-window-vscroll nil (- delta) t t)))))
|
||||
|
||||
(defun pixel-scroll-precision-interpolate (delta &optional old-window)
|
||||
"Interpolate a scroll of DELTA pixels.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue