Patch 8.2.4865

6 views
Skip to first unread message

Bram Moolenaar

unread,
May 4, 2022, 12:52:27 PM5/4/22
to vim...@googlegroups.com

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 -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages