vim-patch:8.2.2418: color not changed if ModeMsg highlight is set in InsertEnter

Problem:    Color not changed if ModeMsg highlight is set in InsertEnter
            autocmd event. (Paul Swanson)
Solution:   Call highlight_changed() after triggering InsertEnter.
            (closes vim/vim#7751)
2e6cdb91e8
This commit is contained in:
Jan Edmund Lazo
2021-01-28 23:03:15 -05:00
parent 2bde381d28
commit f05ffaef1c

View File

@@ -313,6 +313,11 @@ static void insert_enter(InsertState *s)
set_vim_var_string(VV_CHAR, NULL, -1);
ins_apply_autocmds(EVENT_INSERTENTER);
// Check for changed highlighting, e.g. for ModeMsg.
if (need_highlight_changed) {
highlight_changed();
}
// Make sure the cursor didn't move. Do call check_cursor_col() in
// case the text was modified. Since Insert mode was not started yet
// a call to check_cursor_col() may move the cursor, especially with