|| (dirc == '/' && LT_POS(p, lastpos)));
// If anything relevant changed the count has to be recomputed.
- // MB_STRNICMP ignores case, but we should not ignore case.
- // Unfortunately, there is no MB_STRNICMP function.
- // XXX: above comment should be "no MB_STRCMP function" ?
if (!(chgtick == CHANGEDTICK(curbuf)
&& (lastpat != NULL
- && MB_STRNICMP(lastpat, spats[last_idx].pat, lastpatlen) == 0
+ && STRNCMP(lastpat, spats[last_idx].pat, lastpatlen) == 0
&& lastpatlen == spats[last_idx].patlen
)
&& EQUAL_POS(lastpos, *cursor_pos)
call StopVimInTerminal(buf)
endfunc
+func Test_search_stat_smartcase_ignorecase()
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ set shm-=S ignorecase smartcase
+ call setline(1, [' MainmainmainmmmainmAin', ''])
+ END
+ call writefile(lines, 'Xsearchstat_ignorecase', '5')
+
+ let buf = RunVimInTerminal('-S Xsearchstat_ignorecase', #{rows: 10})
+ call term_sendkeys(buf, "/main\<cr>nnnn")
+ call WaitForAssert({-> assert_match('\[5\/5\]', term_getline(buf, 10))}, 1000)
+
+ call term_sendkeys(buf, "/mAin\<cr>")
+ call WaitForAssert({-> assert_match('\[1\/1\]', term_getline(buf, 10))}, 1000)
+
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab