diff options
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index d4bf1c2e90..2f57d8c610 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -1205,9 +1205,9 @@ static void normal_check_interrupt(NormalState *s) static void normal_check_cursor_moved(NormalState *s) { // Trigger CursorMoved if the cursor moved. - if (!finish_op && (has_cursormoved() || curwin->w_p_cole > 0) + if (!finish_op && (has_event(EVENT_CURSORMOVED) || curwin->w_p_cole > 0) && !equalpos(last_cursormoved, curwin->w_cursor)) { - if (has_cursormoved()) { + if (has_event(EVENT_CURSORMOVED)) { apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, false, curbuf); } @@ -1224,7 +1224,7 @@ static void normal_check_cursor_moved(NormalState *s) static void normal_check_text_changed(NormalState *s) { // Trigger TextChanged if b_changedtick differs. - if (!finish_op && has_textchanged() + if (!finish_op && has_event(EVENT_TEXTCHANGED) && last_changedtick != curbuf->b_changedtick) { if (last_changedtick_buf == curbuf) { apply_autocmds(EVENT_TEXTCHANGED, NULL, NULL, false, curbuf); |