vim-patch:8.2.4865: :startinsert right after :stopinsert may not work (#18418)

Problem:    :startinsert right after :stopinsert does not work when popup menu
            is still visible.
Solution:   Use ins_compl_active() instead of pum_visible(). (closes vim/vim#10352)
cd5dbad184
This commit is contained in:
zeertzjq
2022-05-05 06:58:20 +08:00
committed by GitHub
parent e6c71574a0
commit 6798f1fab0
2 changed files with 10 additions and 1 deletions

View File

@@ -553,7 +553,7 @@ static int insert_check(VimState *state)
Insstart_orig = Insstart;
}
if (stop_insert_mode && !pum_visible()) {
if (stop_insert_mode && !compl_started) {
// ":stopinsert" used or 'insertmode' reset
s->count = 0;
return 0; // exit insert mode