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)
ceb0619433
This commit is contained in:
Shougo Matsushita
2021-04-05 09:22:34 +09:00
parent 356a35a848
commit 1996028c5c

View File

@@ -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) { \