summaryrefslogtreecommitdiff
path: root/src/insexpand.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-26 18:35:31 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-26 18:35:31 +0100
commitda812e282a4e2d6d8c9604a3a2a38396437dfe20 (patch)
tree966587f0a847ca6f82d6ce512662234126e09e15 /src/insexpand.c
parent978d170bdce9c0a47e6683cd7c288bc2706f3fff (diff)
downloadvim-git-da812e282a4e2d6d8c9604a3a2a38396437dfe20.tar.gz
patch 8.2.0152: restoring ctrl_x_mode is not neededv8.2.0152
Problem: Restoring ctrl_x_mode is not needed. Solution: Remove restoring the old value, it's changed again soon.
Diffstat (limited to 'src/insexpand.c')
-rw-r--r--src/insexpand.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/insexpand.c b/src/insexpand.c
index 454e2e3f9..e3c811a50 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -2061,17 +2061,12 @@ ins_compl_prep(int c)
auto_format(FALSE, TRUE);
- {
- int new_mode = ctrl_x_mode;
-
- // Trigger the CompleteDone event to give scripts a chance to
- // act upon the completion. Do this before clearing the info,
- // and restore ctrl_x_mode, so that complete_info() can be
- // used.
- ctrl_x_mode = prev_mode;
- ins_apply_autocmds(EVENT_COMPLETEDONE);
- ctrl_x_mode = new_mode;
- }
+ // Trigger the CompleteDone event to give scripts a chance to
+ // act upon the completion. Do this before clearing the info,
+ // and restore ctrl_x_mode, so that complete_info() can be
+ // used.
+ ctrl_x_mode = prev_mode;
+ ins_apply_autocmds(EVENT_COMPLETEDONE);
ins_compl_free();
compl_started = FALSE;