patch 9.2.0656: completion: using wrong tolower() in smartcase filtering

Commit: 
https://github.com/vim/vim/commit/9f5d32cf5caf2476efe4ad1da2d4455920bcc28c
Author: glepnir <[email protected]>
Date:   Tue Jun 16 19:11:38 2026 +0000

    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 <[email protected]>
    Signed-off-by: zeertzjq <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/insexpand.c b/src/insexpand.c
index a355e2949..019fd252a 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 56f8a6590..864688f60 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,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1wZZU5-000z34-8m%40256bit.org.

Raspunde prin e-mail lui