Patch 8.2.4865
Problem: :startinsert right after :stopinsert does not work when popup menu
is still visible.
Solution: Use ins_compl_active() instead of pum_visible(). (closes #10352)
Files: src/edit.c, src/testdir/test_ins_complete.vim
*** ../vim-8.2.4864/src/edit.c 2022-04-29 16:43:56.219178196 +0100
--- src/edit.c 2022-05-04 17:47:22.906231857 +0100
***************
*** 448,454 ****
if (update_Insstart_orig)
Insstart_orig = Insstart;
! if (stop_insert_mode && !pum_visible())
{
// ":stopinsert" used or 'insertmode' reset
count = 0;
--- 448,454 ----
if (update_Insstart_orig)
Insstart_orig = Insstart;
! if (stop_insert_mode && !ins_compl_active())
{
// ":stopinsert" used or 'insertmode' reset
count = 0;
*** ../vim-8.2.4864/src/testdir/test_ins_complete.vim 2022-04-07
21:00:49.423544896 +0100
--- src/testdir/test_ins_complete.vim 2022-05-04 17:47:22.906231857 +0100
***************
*** 555,560 ****
--- 555,569 ----
call delete('Xpumscript')
endfunc
+ func Test_complete_stopinsert_startinsert()
+ nnoremap <F2> <Cmd>startinsert<CR>
+ inoremap <F2> <Cmd>stopinsert<CR>
+ " This just checks if this causes an error
+ call feedkeys("i\<C-X>\<C-N>\<F2>\<F2>", 'x')
+ nunmap <F2>
+ iunmap <F2>
+ endfunc
+
func Test_pum_with_folds_two_tabs()
CheckScreendump
*** ../vim-8.2.4864/src/version.c 2022-05-04 17:29:07.767382639 +0100
--- src/version.c 2022-05-04 17:49:41.762111907 +0100
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 4865,
/**/
--
>From "know your smileys":
:-| :-| Deja' vu!
/// 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/20220504165220.9F5FE1C19BB%40moolenaar.net.