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)
if (update_Insstart_orig)
Insstart_orig = Insstart;
- if (stop_insert_mode && !pum_visible())
+ if (stop_insert_mode && !ins_compl_active())
{
// ":stopinsert" used or 'insertmode' reset
count = 0;
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 4865,
/**/
4864,
/**/