diff options
Diffstat (limited to 'src/nvim/state.c')
-rw-r--r-- | src/nvim/state.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/state.c b/src/nvim/state.c index 7712fcd39a..460a9dd637 100644 --- a/src/nvim/state.c +++ b/src/nvim/state.c @@ -229,7 +229,9 @@ void get_mode(char *buf) /// Fires a ModeChanged autocmd if appropriate. void may_trigger_modechanged(void) { - if (!has_event(EVENT_MODECHANGED)) { + // Skip this when got_int is set, the autocommand will not be executed. + // Better trigger it next time. + if (!has_event(EVENT_MODECHANGED) || got_int) { return; } |