From 1996028c5ce442194b94d8b263a206bae3453ead Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Mon, 5 Apr 2021 09:22:34 +0900 Subject: 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 --- src/nvim/edit.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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) { \ -- cgit