patch 9.0.0445: when opening/closing window text moves up/down

Problem:    When opening/closing window text moves up/down.
Solution:   Add the 'splitscroll' option.  When off text will keep its
            position as much as possible.
This commit is contained in:
Luuk van Baal
2022-09-11 16:59:53 +01:00
committed by Bram Moolenaar
parent 9510d22463
commit 29ab524358
10 changed files with 287 additions and 10 deletions

View File

@ -7499,6 +7499,18 @@ A jump table for the options with a short description can be found at |Q_op|.
When on, splitting a window will put the new window right of the
current one. |:vsplit|
*'splitscroll'* *'spsc'* *'nosplitscroll'* *'nospsc'*
'splitscroll' 'spsc' boolean (default on)
global
The value of this option determines the scroll behavior when opening,
closing or resizing horizontal splits. When "on", splitting a window
horizontally will keep the same relative cursor position in the old and
new window, as well windows that are resized. When "off", scrolling
will be avoided to stabilize the window content. Instead, the cursor
position will be changed when necessary. In this case, the jumplist
will be populated with the previous cursor position. Scrolling cannot
be guaranteed to be avoided when 'wrap' is enabled.
*'startofline'* *'sol'* *'nostartofline'* *'nosol'*
'startofline' 'sol' boolean (default on)
global