aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-27 22:12:30 +0800
committerGitHub <noreply@github.com>2024-07-27 22:12:30 +0800
commitaee4254b76206354d74d6fdd4d8e6b640279cedd (patch)
tree202e727d028ad66adc9b78705cd04a1a31dc7695 /test/old/testdir
parent6162c937abbf80195ccab3daeb7ecdeb6ab24b52 (diff)
parentb8b0e9db3f91fbaa8835b90c683c33310064c8c8 (diff)
downloadrneovim-aee4254b76206354d74d6fdd4d8e6b640279cedd.tar.gz
rneovim-aee4254b76206354d74d6fdd4d8e6b640279cedd.tar.bz2
rneovim-aee4254b76206354d74d6fdd4d8e6b640279cedd.zip
Merge pull request #29876 from glepnir/vim-patch
vim-patch:9.1.{0618,0619,0629}: cannot mark deprecated attributes in completion menu
Diffstat (limited to 'test/old/testdir')
-rw-r--r--test/old/testdir/test_popup.vim44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim
index 20d96a99ea..5e234a397b 100644
--- a/test/old/testdir/test_popup.vim
+++ b/test/old/testdir/test_popup.vim
@@ -1506,4 +1506,48 @@ func Test_pum_highlights_match()
call StopVimInTerminal(buf)
endfunc
+func Test_pum_user_hl_group()
+ CheckScreendump
+ let lines =<< trim END
+ func CompleteFunc( findstart, base )
+ if a:findstart
+ return 0
+ endif
+ return {
+ \ 'words': [
+ \ { 'word': 'aword1', 'menu': 'extra text 1', 'kind': 'W', 'hl_group': 'StrikeFake' },
+ \ { 'word': 'aword2', 'menu': 'extra text 2', 'kind': 'W', },
+ \ { 'word': '你好', 'menu': 'extra text 3', 'kind': 'W', 'hl_group': 'StrikeFake' },
+ \]}
+ endfunc
+ set completeopt=menu
+ set completefunc=CompleteFunc
+
+ hi StrikeFake ctermfg=9
+ func HlMatch()
+ hi PmenuMatchSel ctermfg=6 ctermbg=7 cterm=underline
+ hi PmenuMatch ctermfg=4 ctermbg=225 cterm=underline
+ endfunc
+ END
+ call writefile(lines, 'Xscript', 'D')
+ let buf = RunVimInTerminal('-S Xscript', {})
+
+ call TermWait(buf)
+ call term_sendkeys(buf, "Saw\<C-X>\<C-U>")
+ call VerifyScreenDump(buf, 'Test_pum_highlights_12', {})
+ call term_sendkeys(buf, "\<C-E>\<Esc>")
+
+ call TermWait(buf)
+ call term_sendkeys(buf, ":call HlMatch()\<CR>")
+
+ call TermWait(buf)
+ call term_sendkeys(buf, "Saw\<C-X>\<C-U>")
+ call VerifyScreenDump(buf, 'Test_pum_highlights_13', {})
+ call term_sendkeys(buf, "\<C-N>")
+ call VerifyScreenDump(buf, 'Test_pum_highlights_14', {})
+ call term_sendkeys(buf, "\<C-E>\<Esc>")
+
+ call StopVimInTerminal(buf)
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab