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.
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index b60abc2..336d449 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -7499,6 +7499,18 @@
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
diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt
index 67fc28e..2cc2358 100644
--- a/runtime/doc/quickref.txt
+++ b/runtime/doc/quickref.txt
@@ -919,6 +919,7 @@
'spellsuggest' 'sps' method(s) used to suggest spelling corrections
'splitbelow' 'sb' new window from split is below the current one
'splitright' 'spr' new window is put right of the current one
+'splitscroll' 'spsc' determines scroll behavior when splitting windows
'startofline' 'sol' commands move cursor to first non-blank in line
'statusline' 'stl' custom format for the status line
'suffixes' 'su' suffixes that are ignored with multiple match