mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
vim-patch:8.2.3555: ModeChanged is not triggered on every mode change
Problem: ModeChanged is not triggered on every mode change.
Solution: Also trigger on minor mode changes. (Maguns Gross, closes vim/vim#8999)
25def2c8b8
This commit is contained in:
@@ -925,6 +925,13 @@ static int do_autocmd_event(event_T event, char_u *pat, bool once, int nested, c
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
// need to initialize last_mode for the first ModeChanged autocmd
|
||||
if (event == EVENT_MODECHANGED && !has_event(EVENT_MODECHANGED)) {
|
||||
xfree(last_mode);
|
||||
last_mode = get_mode();
|
||||
}
|
||||
|
||||
ap->cmds = NULL;
|
||||
*prev_ap = ap;
|
||||
last_autopat[(int)event] = ap;
|
||||
|
Reference in New Issue
Block a user