]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1395: search_stat not reset when pattern differs in case v9.1.1395
authorChristian Brabandt <cb@256bit.org>
Fri, 16 May 2025 17:38:50 +0000 (19:38 +0200)
committerChristian Brabandt <cb@256bit.org>
Fri, 16 May 2025 17:38:50 +0000 (19:38 +0200)
commit670d0c1468b7ece958acf3b03de9e202e612804a
tree07cafd7b4e9ea8da541c4ec8b78cd5b3c551fdd8
parentc659e4a51663db6955dd5f690dff536576430374
patch 9.1.1395: search_stat not reset when pattern differs in case

Problem:  search_stat not reset when pattern differs in case
          (tahzibijafar)
Solution: use STRNCMP instead of MB_STRNICMP macro

There was a long standing todo comment, that using MB_STRNICMP is wrong.
So let's change it to STRNCMP() instead. Even if it not handle
multi-byte characters correctly, then Vim will rather recompute the
search stat, instead of re-using the old (and possibly wrong) value.

fixes: #17312
closes: #17314

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/search.c
src/testdir/test_search_stat.vim
src/version.c