diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-26 21:16:34 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-01-26 21:17:54 -0500 |
commit | e673a0df1a0391b61a58cf3579754f7abd17e158 (patch) | |
tree | 10048e7a2ee576ffc30bcda9983b06229d694331 /src/nvim/edit.c | |
parent | 88f133c30d4b46e371f0cdb0797113cbbca9cc59 (diff) | |
download | rneovim-e673a0df1a0391b61a58cf3579754f7abd17e158.tar.gz rneovim-e673a0df1a0391b61a58cf3579754f7abd17e158.tar.bz2 rneovim-e673a0df1a0391b61a58cf3579754f7abd17e158.zip |
vim-patch:8.2.0152: restoring ctrl_x_mode is not needed
Problem: Restoring ctrl_x_mode is not needed.
Solution: Remove restoring the old value, it's changed again soon.
https://github.com/vim/vim/commit/da812e282a4e2d6d8c9604a3a2a38396437dfe20
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 68fa99484c..9c22f09059 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -3594,17 +3594,12 @@ static bool ins_compl_prep(int c) auto_format(FALSE, TRUE); - { - const 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; |