From 37316fbac641ecafde29fd750a08ece490d209c1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 12 Jan 2025 08:04:25 +0800 Subject: vim-patch:9.1.1005: completion text is highlighted even with no pattern found (#31973) Problem: completion text is highlighted even with no pattern found Solution: use ins_compl_leader_len() instead of checking compl_leader.length (glepnir) closes: vim/vim#16422 https://github.com/vim/vim/commit/9fddb8ae770be3e16545dd4c2f4cfaad8f62cb40 Co-authored-by: glepnir --- src/nvim/insexpand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index d1559b00f1..22643457d6 100644 --- a/src/nvim/insexpand.c +++ b/src/nvim/insexpand.c @@ -970,7 +970,7 @@ int ins_compl_col_range_attr(int col) return -1; } - if (col >= (compl_col + (int)compl_leader.size) && col < compl_ins_end_col) { + if (col >= (compl_col + (int)ins_compl_leader_len()) && col < compl_ins_end_col) { return syn_name2attr("ComplMatchIns"); } -- cgit