aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/popupmenu_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-06-18 06:02:01 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-06-18 06:18:58 +0800
commitc2491fbab43fc506f7f902c72206d890e01688a5 (patch)
treec2f9d18c6238808e1480cf6a8bd0cd1e5aab8e42 /test/functional/ui/popupmenu_spec.lua
parentc429c5f86fb8286bbb28e96985d9cc212155201b (diff)
downloadrneovim-c2491fbab43fc506f7f902c72206d890e01688a5.tar.gz
rneovim-c2491fbab43fc506f7f902c72206d890e01688a5.tar.bz2
rneovim-c2491fbab43fc506f7f902c72206d890e01688a5.zip
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 https://github.com/vim/vim/commit/f189138b39a11ed5cf3adea6610469b478841aba Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'test/functional/ui/popupmenu_spec.lua')
-rw-r--r--test/functional/ui/popupmenu_spec.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua
index fac863ead0..a1a21eb317 100644
--- a/test/functional/ui/popupmenu_spec.lua
+++ b/test/functional/ui/popupmenu_spec.lua
@@ -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