mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user