0
0
mirror of https://github.com/vim/vim.git synced 2025-11-16 23:24:03 -05:00

patch 9.1.1657: Autocompletion adds delay

Problem:  Autocompletion adds delay
          (gcanat, char101, after v9.1.1638)
Solution: Temporarily disable autocomplation (Girish Palya).

related: #17960
fixes: #18022
closes: #18048

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Girish Palya
2025-08-20 21:15:06 +02:00
committed by Christian Brabandt
parent 84a343a6ed
commit 196c376682
8 changed files with 66 additions and 14 deletions

View File

@@ -7088,7 +7088,10 @@ ins_complete(int c, int enable_pum)
if (!compl_started)
{
if (ins_compl_start() == FAIL)
{
compl_autocomplete = FALSE;
return FAIL;
}
}
else if (insert_match && stop_arrow() == FAIL)
return FAIL;
@@ -7175,25 +7178,20 @@ ins_complete(int c, int enable_pum)
compl_was_interrupted = compl_interrupted;
compl_interrupted = FALSE;
compl_autocomplete = FALSE;
return OK;
}
/*
* Returns TRUE if the given character 'c' can be used to trigger
* autocompletion.
* Enable/disable autocompletion
*/
int
ins_compl_setup_autocompl(int c)
void
ins_compl_set_autocomplete(int value)
{
#ifdef ELAPSED_FUNC
if (vim_isprintc(c))
{
compl_autocomplete = TRUE;
return TRUE;
}
compl_autocomplete = value;
#endif
return FALSE;
}
/*