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

patch 9.1.1800: completion: strange behaviour with 'ac' completeopt=longest,preinsert

Problem:  completion: strange behaviour with 'ac'
          completeopt=longest,preinsert (zeertzjq)
Solution: Let preinsert take precedence (Girish Palya)

fixes: #18410
closes: #18428

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Girish Palya
2025-09-28 17:12:55 +00:00
committed by Christian Brabandt
parent 3aa2edb557
commit d35e5e4237
4 changed files with 17 additions and 4 deletions

View File

@@ -3100,7 +3100,8 @@ ins_compl_prep(int c)
if (ctrl_x_mode_not_defined_yet()
|| (ctrl_x_mode_normal() && !compl_started))
{
compl_get_longest = (get_cot_flags() & COT_LONGEST) != 0;
compl_get_longest = (get_cot_flags() & COT_LONGEST)
&& !ins_compl_has_autocomplete();
compl_used_match = TRUE;
}