diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-07-27 21:44:05 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-07-27 21:56:44 +0800 |
commit | b8b0e9db3f91fbaa8835b90c683c33310064c8c8 (patch) | |
tree | 350d237bd0f5f74fe146b8b73f83243ec4d3d56a /test/old/testdir | |
parent | 985c636aa6dfcec2a1b788549c3f3ac058c8d141 (diff) | |
download | rneovim-b8b0e9db3f91fbaa8835b90c683c33310064c8c8.tar.gz rneovim-b8b0e9db3f91fbaa8835b90c683c33310064c8c8.tar.bz2 rneovim-b8b0e9db3f91fbaa8835b90c683c33310064c8c8.zip |
vim-patch:9.1.0629: Rename of pum hl_group is incomplete
Problem: Rename of pum hl_group is incomplete in source.
Solution: Also rename the test function. Rename to user_hlattr in code
to avoid confusion with pum_extra. Add test with matched text
highlighting (zeertzjq).
closes: vim/vim#15348
https://github.com/vim/vim/commit/4100852e099133a0c9603e1087e5dc6d82001ce7
Diffstat (limited to 'test/old/testdir')
-rw-r--r-- | test/old/testdir/test_popup.vim | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim index 1bba1d9397..5e234a397b 100644 --- a/test/old/testdir/test_popup.vim +++ b/test/old/testdir/test_popup.vim @@ -1506,10 +1506,9 @@ func Test_pum_highlights_match() call StopVimInTerminal(buf) endfunc -func Test_pum_extrahl() +func Test_pum_user_hl_group() CheckScreendump let lines =<< trim END - hi StrikeFake ctermfg=9 func CompleteFunc( findstart, base ) if a:findstart return 0 @@ -1523,15 +1522,31 @@ func Test_pum_extrahl() 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, "iaw\<C-X>\<C-u>") - call TermWait(buf, 50) + call term_sendkeys(buf, "Saw\<C-X>\<C-U>") call VerifyScreenDump(buf, 'Test_pum_highlights_12', {}) - call term_sendkeys(buf, "\<C-E>\<Esc>u") + 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 |