diff options
author | mityu <mityu.mail@gmail.com> | 2022-09-14 17:27:36 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-09-14 17:27:36 +0100 |
commit | e697d488901b6321ddaad68b553f0a434c97d849 (patch) | |
tree | 140cf4e5890b2b4a64e51727aa0ec53a74aff9e9 /src/ex_getln.c | |
parent | 702bd6c7c61073c0907fd7608911aebee4acd337 (diff) | |
download | vim-git-e697d488901b6321ddaad68b553f0a434c97d849.tar.gz |
patch 9.0.0465: cursor moves when cmdwin is closed when 'splitscroll' is offv9.0.0465
Problem: Cursor moves when cmdwin is closed when 'splitscroll' is off.
Solution: Temporarily set 'splitscroll' when jumping back to the original
window. (closes #11128)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index f9226de6e..4a5ac318e 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4405,6 +4405,7 @@ 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 @@ -4643,7 +4644,11 @@ open_cmdwin(void) // First go back to the original window. wp = curwin; set_bufref(&bufref, curbuf); + + save_p_spsc = p_spsc; + p_spsc = TRUE; win_goto(old_curwin); + p_spsc = save_p_spsc; // win_goto() may trigger an autocommand that already closes the // cmdline window. |