diff options
author | glepnir <glephunter@gmail.com> | 2025-01-11 07:58:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-10 23:58:45 +0000 |
commit | fbe546e25d21f3184814d696c329d23d146bd615 (patch) | |
tree | e8e9b1a4cd34a8e2bb64f5f61de2c91e4c3c96ef /src | |
parent | dcaf9a60e9c0b3b4f8439897b344b4e632802beb (diff) | |
download | rneovim-fbe546e25d21f3184814d696c329d23d146bd615.tar.gz rneovim-fbe546e25d21f3184814d696c329d23d146bd615.tar.bz2 rneovim-fbe546e25d21f3184814d696c329d23d146bd615.zip |
vim-patch:9.1.0996: ComplMatchIns may highlight wrong text (#31931)
Problem: ComplMatchIns may highlight wrong text
Solution: don't highlight in case of fuzzy match,
skip-highlight when not inserting anything
(glepnir)
closes: vim/vim#16404
https://github.com/vim/vim/commit/e890887b8052561ac5f8dce218e578ed28599cc6
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/insexpand.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/insexpand.c b/src/nvim/insexpand.c index 419c806592..d1559b00f1 100644 --- a/src/nvim/insexpand.c +++ b/src/nvim/insexpand.c @@ -966,7 +966,11 @@ static void ins_compl_insert_bytes(char *p, int len) /// -1 mean normal item. int ins_compl_col_range_attr(int col) { - if (col >= compl_col && col < compl_ins_end_col) { + if (get_cot_flags() & kOptCotFlagFuzzy) { + return -1; + } + + if (col >= (compl_col + (int)compl_leader.size) && col < compl_ins_end_col) { return syn_name2attr("ComplMatchIns"); } |