summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_popup.vim
diff options
context:
space:
mode:
authorglepnir <glephunter@gmail.com>2024-06-17 18:35:25 +0200
committerChristian Brabandt <cb@256bit.org>2024-06-17 18:35:25 +0200
commitf189138b39a11ed5cf3adea6610469b478841aba (patch)
treedaf1676b4e5ea491b7a370467a24b8181cc21827 /src/testdir/test_popup.vim
parentd8c9340fc67ca19f82ec3e77ec38296424e758cf (diff)
patch 9.1.0496: matched text is highlighted case-sensitivelyv9.1.0496
Problem: matched text is highlighted case-sensitively Solution: use MB_STRNICMP, update highlighting when the base changes (glepnir) fixes: #15021 closes: #15023 Co-authored-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: glepnir <glephunter@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir/test_popup.vim')
-rw-r--r--src/testdir/test_popup.vim21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim
index d1fa5a96f8..dd01a57da8 100644
--- a/src/testdir/test_popup.vim
+++ b/src/testdir/test_popup.vim
@@ -1400,6 +1400,20 @@ func Test_pum_highlights_match()
\ { '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 ctermfg=6 ctermbg=7
@@ -1463,7 +1477,14 @@ func Test_pum_highlights_match()
call term_sendkeys(buf, ":set norightleft\<CR>")
endif
+ call term_sendkeys(buf, "S\<C-R>=Comp()\<CR>f")
+ call VerifyScreenDump(buf, 'Test_pum_highlights_09', {})
+ call term_sendkeys(buf, "o\<BS>\<C-R>=Comp()\<CR>")
+ call VerifyScreenDump(buf, 'Test_pum_highlights_09', {})
+
+ call term_sendkeys(buf, "\<C-E>\<Esc>")
call TermWait(buf)
+
call StopVimInTerminal(buf)
endfunc