mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:9.1.0496: matched text is highlighted case-sensitively
Problem: matched text is highlighted case-sensitively
Solution: use MB_STRNICMP, update highlighting when the base changes
(glepnir)
fixes: vim/vim#15021
closes: vim/vim#15023
f189138b39
Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -448,7 +448,8 @@ static int *pum_compute_text_attrs(char *text, hlf_T hlf)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
char *leader = State == MODE_CMDLINE ? cmdline_compl_pattern() : ins_compl_leader();
|
||||
char *leader = State == MODE_CMDLINE ? cmdline_compl_pattern()
|
||||
: ins_compl_leader();
|
||||
if (leader == NULL || *leader == NUL) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -464,7 +465,7 @@ static int *pum_compute_text_attrs(char *text, hlf_T hlf)
|
||||
if (in_fuzzy) {
|
||||
ga = fuzzy_match_str_with_pos(text, leader);
|
||||
} else {
|
||||
matched_start = strncmp(text, leader, leader_len) == 0;
|
||||
matched_start = mb_strnicmp(text, leader, leader_len) == 0;
|
||||
}
|
||||
|
||||
const char *ptr = text;
|
||||
|
Reference in New Issue
Block a user