Patch 9.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)
Files: src/ex_getln.c, src/testdir/test_window_cmd.vim
*** ../vim-9.0.0464/src/ex_getln.c 2022-09-11 21:35:47.558255161 +0100
--- src/ex_getln.c 2022-09-14 17:24:40.404548054 +0100
***************
*** 4405,4410 ****
--- 4405,4411 ----
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,4649 ****
--- 4644,4654 ----
// 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.
*** ../vim-9.0.0464/src/testdir/test_window_cmd.vim 2022-09-14
01:27:17.632593480 +0100
--- src/testdir/test_window_cmd.vim 2022-09-14 17:20:24.337181894 +0100
***************
*** 1734,1742 ****
above copen | wincmd j
call assert_equal(win_screenpos(0)[0] - tabline, line("w0"))
! " No scroll when opening cmdwin
! only | norm ggLq:
call assert_equal(1, line("w0"))
" Scroll when cursor becomes invalid in insert mode
norm Lic
--- 1734,1746 ----
above copen | wincmd j
call assert_equal(win_screenpos(0)[0] - tabline, line("w0"))
! " No scroll when opening cmdwin, and no cursor move when closing
! " cmdwin.
! only | norm ggL
! let curpos = getcurpos()
! norm q:
call assert_equal(1, line("w0"))
+ call assert_equal(curpos, getcurpos())
" Scroll when cursor becomes invalid in insert mode
norm Lic
*** ../vim-9.0.0464/src/version.c 2022-09-14 16:09:53.344308323 +0100
--- src/version.c 2022-09-14 17:23:18.460751528 +0100
***************
*** 705,706 ****
--- 705,708 ----
{ /* Add new patch number below this line */
+ /**/
+ 465,
/**/
--
hundred-and-one symptoms of being an internet addict:
73. You give your dog used motherboards instead of bones
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220914162832.8EA721C1582%40moolenaar.net.