aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 223b0acbc0..f5ba9c1c05 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -563,10 +563,8 @@ static int insert_execute(VimState *state, int key)
// Special handling of keys while the popup menu is visible or wanted
// and the cursor is still in the completed word. Only when there is
// a match, skip this when no matches were found.
- bool ins_completion = ins_compl_active()
- && curwin->w_cursor.col >= ins_compl_col()
- && ins_compl_has_shown_match();
- if (ins_completion && pum_wanted()) {
+ if (ins_compl_active() && curwin->w_cursor.col >= ins_compl_col()
+ && ins_compl_has_shown_match() && pum_wanted()) {
// BS: Delete one character from "compl_leader".
if ((s->c == K_BS || s->c == Ctrl_H)
&& curwin->w_cursor.col > ins_compl_col()
@@ -616,8 +614,6 @@ static int insert_execute(VimState *state, int key)
ins_compl_delete(false);
}
}
- } else if (ins_completion && !pum_wanted() && ins_compl_preinsert_effect()) {
- ins_compl_delete(false);
}
// Prepare for or stop CTRL-X mode. This doesn't do completion, but it does