aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-01 11:40:45 +0800
committerGitHub <noreply@github.com>2022-04-01 11:40:45 +0800
commit973e91007ce3f343f7aeed8d30d70a8616ab6bb5 (patch)
treeafa42fdbb9fb0c3b7f0d305c2b7407cb178b322f /src/nvim/edit.c
parent8a6cf51a710585fee7edb9d1357791da30f31f44 (diff)
downloadrneovim-973e91007ce3f343f7aeed8d30d70a8616ab6bb5.tar.gz
rneovim-973e91007ce3f343f7aeed8d30d70a8616ab6bb5.tar.bz2
rneovim-973e91007ce3f343f7aeed8d30d70a8616ab6bb5.zip
refactor: remove redundant check for w_p_cole (#17944)
No longer needed after #17890.
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 815d57121b..a2687ada73 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -1486,7 +1486,7 @@ static void ins_redraw(bool ready)
// Trigger CursorMoved if the cursor moved. Not when the popup menu is
// visible, the command might delete it.
- if (ready && (has_event(EVENT_CURSORMOVEDI) || curwin->w_p_cole > 0)
+ if (ready && has_event(EVENT_CURSORMOVEDI)
&& !equalpos(curwin->w_last_cursormoved, curwin->w_cursor)
&& !pum_visible()) {
// Need to update the screen first, to make sure syntax
@@ -1496,12 +1496,10 @@ static void ins_redraw(bool ready)
if (syntax_present(curwin) && must_redraw) {
update_screen(0);
}
- if (has_event(EVENT_CURSORMOVEDI)) {
- // Make sure curswant is correct, an autocommand may call
- // getcurpos()
- update_curswant();
- ins_apply_autocmds(EVENT_CURSORMOVEDI);
- }
+ // Make sure curswant is correct, an autocommand may call
+ // getcurpos()
+ update_curswant();
+ ins_apply_autocmds(EVENT_CURSORMOVEDI);
curwin->w_last_cursormoved = curwin->w_cursor;
}