vim-patch:9.1.0496: matched text is highlighted case-sensitively

Problem:  matched text is highlighted case-sensitively
Solution: use MB_STRNICMP, update highlighting when the base changes
          (glepnir)

fixes: vim/vim#15021
closes: vim/vim#15023

f189138b39

Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
zeertzjq
2024-06-18 06:02:01 +08:00
parent c429c5f86f
commit c2491fbab4
4 changed files with 53 additions and 3 deletions

View File

@@ -4739,6 +4739,20 @@ describe('builtin popupmenu', function()
\ { 'word': '你可好吗' },
\]}
endfunc
func Comp()
let col = col('.')
if getline('.') == 'f'
let col -= 1
endif
call complete(col, [
\ #{word: "foo", icase: 1},
\ #{word: "Foobar", icase: 1},
\ #{word: "fooBaz", icase: 1},
\])
return ''
endfunc
set omnifunc=Omni_test
set completeopt=menu,noinsert,fuzzy
hi PmenuMatchSel guifg=Blue guibg=Grey
@@ -4878,6 +4892,20 @@ describe('builtin popupmenu', function()
]])
feed('<C-E><Esc>')
command('set norightleft')
feed('S<C-R>=Comp()<CR>f')
screen:expect([[
f^ |
{ms:f}{s:oo }{1: }|
{mn:F}{n:oobar }{1: }|
{mn:f}{n:ooBaz }{1: }|
{1:~ }|*15
{2:-- INSERT --} |
]])
feed('o<BS><C-R>=Comp()<CR>')
screen:expect_unchanged(true)
feed('<C-E><Esc>')
end)
end
end