diff options
author | Charles Joachim <cacplate@gmail.com> | 2016-01-10 22:45:49 -0500 |
---|---|---|
committer | Charles Joachim <cacplate@gmail.com> | 2016-01-11 08:45:19 -0500 |
commit | 879c668d14095b5eaa5204c89034e369a8f0240d (patch) | |
tree | 328089e9d464de887210b8b2f3973637a98073e5 /src/nvim/normal.c | |
parent | 3b94756feb39ad269104b2f765c6c56ff2360203 (diff) | |
download | rneovim-879c668d14095b5eaa5204c89034e369a8f0240d.tar.gz rneovim-879c668d14095b5eaa5204c89034e369a8f0240d.tar.bz2 rneovim-879c668d14095b5eaa5204c89034e369a8f0240d.zip |
fileio: Replace some event checking functions with one has_event
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); |