diff options
author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2021-04-05 09:22:34 +0900 |
---|---|---|
committer | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2021-04-05 09:24:11 +0900 |
commit | 1996028c5ce442194b94d8b263a206bae3453ead (patch) | |
tree | 6a3ef95ea4b948734531eb5d2264f7b212144143 | |
parent | 356a35a848b314bfb1003f8e11d37eb64974f519 (diff) | |
download | rneovim-1996028c5ce442194b94d8b263a206bae3453ead.tar.gz rneovim-1996028c5ce442194b94d8b263a206bae3453ead.tar.bz2 rneovim-1996028c5ce442194b94d8b263a206bae3453ead.zip |
vim-patch:8.2.2707: adding a lot of completions can still be a bit slow
Problem: Adding a lot of completions can still be a bit slow.
Solution: Add the check for CP_FAST. (Ben Jackson)
https://github.com/vim/vim/commit/ceb06194337f1a9d30cd12edb7b0dc51830b9cb7
-rw-r--r-- | src/nvim/edit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index c0dfd54eff..b639da8fb5 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -2319,7 +2319,11 @@ static int ins_compl_add(char_u *const str, int len, const Direction dir = (cdir == kDirectionNotSet ? compl_direction : cdir); int flags = flags_arg; - os_breakcheck(); + if (flags & CP_FAST) { + fast_breakcheck(); + } else { + os_breakcheck(); + } #define FREE_CPTEXT(cptext, cptext_allocated) \ do { \ if (cptext != NULL && cptext_allocated) { \ |