diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2020-01-26 19:54:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-26 19:54:26 -0800 |
commit | d3a9d75c0462fea7b00e639d1b324bcf08a8b02d (patch) | |
tree | 28caf8951b81d9c44129fa9eaae7f76c4d021245 /src/nvim/edit.c | |
parent | b5daee7b8faaa00b83eb17ad231b8dbc417f628c (diff) | |
parent | 5ede2766c8d994f9e299288d46cefdd12ffee47f (diff) | |
download | rneovim-d3a9d75c0462fea7b00e639d1b324bcf08a8b02d.tar.gz rneovim-d3a9d75c0462fea7b00e639d1b324bcf08a8b02d.tar.bz2 rneovim-d3a9d75c0462fea7b00e639d1b324bcf08a8b02d.zip |
Merge #11772 from janlazo/vim-8.2.0152
vim-patch:8.2.{152,158}
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 68fa99484c..e253905057 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -3594,17 +3594,11 @@ 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 CompleteDonePre event to give scripts a chance to + // act upon the completion 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_COMPLETEDONEPRE); ins_compl_free(); compl_started = false; @@ -3630,6 +3624,9 @@ static bool ins_compl_prep(int c) */ if (want_cindent && in_cinkeys(KEY_COMPLETE, ' ', inindent(0))) do_c_expr_indent(); + // Trigger the CompleteDone event to give scripts a chance to act + // upon the end of completion. + ins_apply_autocmds(EVENT_COMPLETEDONE); } } else if (ctrl_x_mode == CTRL_X_LOCAL_MSG) /* Trigger the CompleteDone event to give scripts a chance to act |