0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.0647: the 'splitscroll' option is not a good name

Problem:    The 'splitscroll' option is not a good name.
Solution:   Rename 'splitscroll' to 'splitkeep' and make it a string option,
            also supporting "topline". (Luuk van Baal, closes #11258)
This commit is contained in:
Luuk van Baal
2022-10-03 15:28:08 +01:00
committed by Bram Moolenaar
parent 6b2d4ff714
commit 13ece2ae1d
21 changed files with 141 additions and 129 deletions

View File

@@ -219,6 +219,10 @@ update_topline(void)
long *so_ptr = curwin->w_p_so >= 0 ? &curwin->w_p_so : &p_so;
int save_so = *so_ptr;
// Cursor is updated instead when this is TRUE for 'splitkeep'.
if (skip_update_topline)
return;
// If there is no valid screen and when the window height is zero just use
// the cursor line.
if (!screen_valid(TRUE) || curwin->w_height == 0)
@@ -1027,8 +1031,7 @@ curs_columns(
/*
* First make sure that w_topline is valid (after moving the cursor).
*/
if (!skip_update_topline)
update_topline();
update_topline();
/*
* Next make sure that w_cline_row is valid.