diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2016-01-12 09:45:09 -0500 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2016-01-12 09:45:09 -0500 |
commit | 970b5f2752feb3ba5c906c5019f5ea778ead5a90 (patch) | |
tree | 8cdcd8f7d2a04e2b30773018a7b51d14ee18b998 /src/nvim/normal.c | |
parent | 7497dbee16fa8a452d12a9134e58526c255813bc (diff) | |
parent | 879c668d14095b5eaa5204c89034e369a8f0240d (diff) | |
download | rneovim-970b5f2752feb3ba5c906c5019f5ea778ead5a90.tar.gz rneovim-970b5f2752feb3ba5c906c5019f5ea778ead5a90.tar.bz2 rneovim-970b5f2752feb3ba5c906c5019f5ea778ead5a90.zip |
Merge pull request #3984 from cacplate/has_event
Remove redundant functions to replace for the general has_event function
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); |