diff options
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 72e80952ff..8332b8bbd6 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -1233,12 +1233,9 @@ static void normal_check_window_scrolled(NormalState *s) static void normal_check_cursor_moved(NormalState *s) { // Trigger CursorMoved if the cursor moved. - if (!finish_op && (has_event(EVENT_CURSORMOVED) || curwin->w_p_cole > 0) + if (!finish_op && has_event(EVENT_CURSORMOVED) && !equalpos(curwin->w_last_cursormoved, curwin->w_cursor)) { - if (has_event(EVENT_CURSORMOVED)) { - apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, false, curbuf); - } - + apply_autocmds(EVENT_CURSORMOVED, NULL, NULL, false, curbuf); curwin->w_last_cursormoved = curwin->w_cursor; } } |