mirror of
https://github.com/neovim/neovim.git
synced 2026-07-09 19:09:39 +00:00
vim-patch:9.2.0656: completion: using wrong tolower() in smartcase filtering
Problem: ins_compl_equal_sc() uses MB_TOLOWER() on single bytes, but
it indexes raw bytes, not decoded characters (after v9.1.0651).
Solution: Use TOLOWER_LOC(), matching what STRNICMP()/ins_compl_equal()
does (glephunter).
closes: vim/vim#20535
9f5d32cf5c
Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -1107,7 +1107,7 @@ static bool ins_compl_equal_sc(compl_T *match, char *str, size_t len)
|
||||
|
||||
for (int i = 0; (size_t)i < len; i++) {
|
||||
if (i >= typed && i < longest_end
|
||||
? mb_tolower((uint8_t)match->cp_str.data[i]) != mb_tolower((uint8_t)str[i])
|
||||
? TOLOWER_LOC((uint8_t)match->cp_str.data[i]) != TOLOWER_LOC((uint8_t)str[i])
|
||||
: match->cp_str.data[i] != str[i]) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user