aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-28 23:03:15 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-28 23:04:27 -0500
commitf05ffaef1c184986e653739f7844a592f781483b (patch)
tree66ee2411c83dd8278773684e96f5692601ac37b8 /src
parent2bde381d28ccad65267afb88d3ab0e09aedbb912 (diff)
downloadrneovim-f05ffaef1c184986e653739f7844a592f781483b.tar.gz
rneovim-f05ffaef1c184986e653739f7844a592f781483b.tar.bz2
rneovim-f05ffaef1c184986e653739f7844a592f781483b.zip
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) https://github.com/vim/vim/commit/2e6cdb91e8dea08301f31bc83188c06112eb7f57
Diffstat (limited to 'src')
-rw-r--r--src/nvim/edit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index b2abb06075..100e88e261 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -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