From e74c2334f2bf7dccee337df20817b3351dbff3ec Mon Sep 17 00:00:00 2001 From: Jurica Bradaric Date: Sat, 27 Aug 2016 21:24:46 +0200 Subject: vim-patch:7.4.1961 Problem: When 'insertmode' is reset while doing completion the popup menu remains even though Vim is in Normal mode. Solution: Ignore stop_insert_mode when the popup menu is visible. Don't set stop_insert_mode when 'insertmode' was already off. (Christian Brabandt) https://github.com/vim/vim/commit/00672e1d3f59dbff91a18d418b2984be96f89ee5 --- src/nvim/edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/edit.c') diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 18d5ea533d..ca5b6f02ce 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -502,7 +502,7 @@ static int insert_check(VimState *state) Insstart_orig = Insstart; } - if (stop_insert_mode) { + if (stop_insert_mode && !pum_visible()) { // ":stopinsert" used or 'insertmode' reset s->count = 0; return 0; // exit insert mode -- cgit