]> granicus.if.org Git - vim/commitdiff
patch 8.2.2418: color not changed if ModeMsg highlight is set in InsertEnter v8.2.2418
authorBram Moolenaar <Bram@vim.org>
Thu, 28 Jan 2021 10:07:44 +0000 (11:07 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 28 Jan 2021 10:07:44 +0000 (11:07 +0100)
Problem:    Color not changed if ModeMsg highlight is set in InsertEnter
            autocmd event. (Paul Swanson)
Solution:   Call highlight_changed() after triggering InsertEnter.
            (closes #7751)

src/edit.c
src/version.c

index 35e4bc2c4bfcd943f500498d57286e76eafca6d2..9162fe629894580e097fe3c86adcc66785c4125b 100644 (file)
@@ -196,6 +196,10 @@ edit(
 #endif
        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
index d9d8104afe7f19fb4a06fb482afeceb397a4d93b..fa3ce6f5e410828dfb2c41634c767f7051a836b2 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2418,
 /**/
     2417,
 /**/