diff --git a/src/edit.c b/src/edit.c index 61c1694836..65b760ba04 100644 --- a/src/edit.c +++ b/src/edit.c @@ -448,7 +448,7 @@ edit( 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; diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index 75ec03cb37..6bb499701b 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -555,6 +555,15 @@ func Test_pum_stopped_by_timer() call delete('Xpumscript') endfunc +func Test_complete_stopinsert_startinsert() + nnoremap startinsert + inoremap stopinsert + " This just checks if this causes an error + call feedkeys("i\\\\", 'x') + nunmap + iunmap +endfunc + func Test_pum_with_folds_two_tabs() CheckScreendump diff --git a/src/version.c b/src/version.c index 19223239a7..bf2c8dc7cf 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 4865, /**/ 4864, /**/