patch 9.1.0996: ComplMatchIns may highlight wrong text
Problem: ComplMatchIns may highlight wrong text
Solution: don't highlight in case of fuzzy match,
skip-highlight when not inserting anything
(glepnir)
closes: #16404
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/insexpand.c b/src/insexpand.c
index 818b1b9..22f021d 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -924,7 +924,10 @@
int
ins_compl_col_range_attr(int col)
{
- if (col >= compl_col && col < compl_ins_end_col)
+ if ((get_cot_flags() & COT_FUZZY))
+ return -1;
+
+ if (col >= (compl_col + (int)compl_leader.length) && col < compl_ins_end_col)
return syn_name2attr((char_u *)"ComplMatchIns");
return -1;