]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0656: completion: using wrong tolower() in smartcase filtering v9.2.0656
authorglepnir <glephunter@gmail.com>
Tue, 16 Jun 2026 19:11:38 +0000 (19:11 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 16 Jun 2026 19:11:38 +0000 (19:11 +0000)
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 <glephunter@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/insexpand.c
src/version.c

index a355e29492984cb742098c42819ef27967e244ec..019fd252ac8ee7b86325a0a15c17591a8387cdff 100644 (file)
@@ -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;
     }
index 56f8a65908717b89248f2289bcdca35499fc7a27..864688f60df786b8da3ea3e0a5dffba41c4ad5f2 100644 (file)
@@ -759,6 +759,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    656,
 /**/
     655,
 /**/