summaryrefslogtreecommitdiff
path: root/doc/lispref/windows.texi
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-05-09 09:37:58 +0800
committerPo Lu <luangruo@yahoo.com>2022-05-09 09:37:58 +0800
commitfd8eaa72a611d050e1fe9c38c466c7812c7795dd (patch)
treebe22a6731bfa1ebafd3e52a02a09de9308e6ff4f /doc/lispref/windows.texi
parent3d846efb857c0ace95d6fe026522fcdbffe04dc3 (diff)
downloademacs-fd8eaa72a611d050e1fe9c38c466c7812c7795dd.tar.gz
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)
Diffstat (limited to 'doc/lispref/windows.texi')
-rw-r--r--doc/lispref/windows.texi8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 97908bea001..57763c146da 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -5508,7 +5508,7 @@ pixels, rather than in units of the normal line height.
@end example
@end defun
-@defun set-window-vscroll window lines &optional pixels-p
+@defun set-window-vscroll window lines &optional pixels-p preserve-vscroll-p
This function sets @var{window}'s vertical scroll position to
@var{lines}. If @var{window} is @code{nil}, the selected window is
used. The argument @var{lines} should be zero or positive; if not, it
@@ -5530,6 +5530,12 @@ The return value is the result of this rounding.
If @var{pixels-p} is non-@code{nil}, @var{lines} specifies a number of
pixels. In this case, the return value is @var{lines}.
+
+Normally, the vscroll does not take effect on windows that aren't the
+@code{minibuffer-scroll-window} or the selected window when the
+mini-window is resized (@pxref{Minibuffer Windows}). This ``frozen''
+behavior is disabled when the @var{preserve-vscroll-p} parameter is
+non-@code{nil}, which means to set the vscroll as usual.
@end defun
@defvar auto-window-vscroll