summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/edit.c b/src/edit.c
index e9a994f6b2..5760b06e86 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -843,7 +843,12 @@ doESCkey:
if (cmdchar != 'r' && cmdchar != 'v' && c != Ctrl_C)
ins_apply_autocmds(EVENT_INSERTLEAVE);
did_cursorhold = FALSE;
- curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
+
+ // ins_redraw() triggers TextChangedI only when no characters
+ // are in the typeahead buffer, so only reset curbuf->b_last_changedtick
+ // if the TextChangedI was not blocked by char_avail() (e.g. using :norm!)
+ if (!char_avail())
+ curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
return (c == Ctrl_O);
}
continue;