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/option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/option.c') diff --git a/src/nvim/option.c b/src/nvim/option.c index d8908cca90..2ec8038731 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3661,7 +3661,7 @@ set_bool_option ( if ((State & INSERT) == 0) need_start_insertmode = TRUE; stop_insert_mode = FALSE; - } else { + } else if (old_value) { // only reset if it was set previously need_start_insertmode = FALSE; stop_insert_mode = TRUE; if (restart_edit != 0 && mode_displayed) -- cgit