From: glepnir Date: Tue, 16 Jun 2026 19:11:38 +0000 (+0000) Subject: patch 9.2.0656: completion: using wrong tolower() in smartcase filtering X-Git-Tag: v9.2.0656^0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9f5d32cf5caf2476efe4ad1da2d4455920bcc28c;p=thirdparty%2Fvim.git 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: #20535 Signed-off-by: glepnir Signed-off-by: zeertzjq Signed-off-by: Christian Brabandt --- diff --git a/src/insexpand.c b/src/insexpand.c index a355e29492..019fd252ac 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -1072,7 +1072,7 @@ ins_compl_equal_sc(compl_T *match, char_u *str, int len) for (int i = 0; i < len; ++i) { if (i >= typed && i < longest_end - ? MB_TOLOWER(match->cp_str.string[i]) != MB_TOLOWER(str[i]) + ? TOLOWER_LOC(match->cp_str.string[i]) != TOLOWER_LOC(str[i]) : match->cp_str.string[i] != str[i]) return FALSE; } diff --git a/src/version.c b/src/version.c index 56f8a65908..864688f60d 100644 --- a/src/version.c +++ b/src/version.c @@ -759,6 +759,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 656, /**/ 655, /**/