vim-patch:9.0.1772: Cursor may be adjusted in 'splitkeep'ed windows (#24811)

Problem:    Cursor is adjusted in window that did not change in size by
            'splitkeep'.
Solution:   Only check that cursor position is valid in a window that
            has changed in size.

closes: vim/vim#12509

16af913eee

Co-authored-by: Luuk van Baal <luukvbaal@gmail.com>
This commit is contained in:
zeertzjq
2023-08-21 08:58:18 +08:00
committed by GitHub
parent 694814cdd5
commit a2a226170d
4 changed files with 95 additions and 4 deletions

View File

@@ -1194,6 +1194,7 @@ struct window_S {
int w_hsep_height; // Number of horizontal separator rows (0 or 1)
int w_vsep_width; // Number of vertical separator columns (0 or 1).
pos_save_T w_save_cursor; // backup of cursor pos and topline
bool w_do_win_fix_cursor; // if true cursor may be invalid
int w_winrow_off; ///< offset from winrow to the inner window area
int w_wincol_off; ///< offset from wincol to the inner window area