diff options
author | Luuk van Baal <luukvbaal@gmail.com> | 2022-09-15 12:43:26 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-15 12:43:26 +0100 |
commit | 3735f11050616652525bf80b4fbcb2b3bfeab113 (patch) | |
tree | 0f03839e7c767f890f0cfa7b8fe8d966a6046595 /src/ex_getln.c | |
parent | aeef1f7f6d8f6d4e84ffc9a24874f10403e4ddcd (diff) |
patch 9.0.0469: cursor moves if cmdwin is closed when 'splitscroll' is offv9.0.0469
Problem: Cursor moves if cmdwin is closed when 'splitscroll' is off.
Solution: Skip win_fix_cursor if called when cmdwin is open or closing.
(Luuk van Baal, closes #11134)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 4a5ac318e9..70436b31f0 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4405,7 +4405,6 @@ open_cmdwin(void) int save_restart_edit = restart_edit; int save_State = State; int save_exmode = exmode_active; - int save_p_spsc; #ifdef FEAT_RIGHTLEFT int save_cmdmsg_rl = cmdmsg_rl; #endif @@ -4645,10 +4644,8 @@ open_cmdwin(void) wp = curwin; set_bufref(&bufref, curbuf); - save_p_spsc = p_spsc; - p_spsc = TRUE; + skip_win_fix_cursor = TRUE; win_goto(old_curwin); - p_spsc = save_p_spsc; // win_goto() may trigger an autocommand that already closes the // cmdline window. @@ -4662,6 +4659,7 @@ open_cmdwin(void) // Restore window sizes. win_size_restore(&winsizes); + skip_win_fix_cursor = FALSE; } ga_clear(&winsizes); |