diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-06-18 05:49:33 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-06-18 06:18:34 +0800 |
commit | c429c5f86fb8286bbb28e96985d9cc212155201b (patch) | |
tree | aeb7664e95cac099e98cd9d07cace3ea254e302e /test/old | |
parent | b60030b7bf3e638ba134550091131fc5229b69a1 (diff) | |
download | rneovim-c429c5f86fb8286bbb28e96985d9cc212155201b.tar.gz rneovim-c429c5f86fb8286bbb28e96985d9cc212155201b.tar.bz2 rneovim-c429c5f86fb8286bbb28e96985d9cc212155201b.zip |
vim-patch:9.1.0495: Matched text isn't highlighted in cmdline pum
Problem: Matched text isn't highlighted in cmdline pum.
Solution: Use cmdline completion pattern in cmdline mode.
(zeertzjq)
closes: vim/vim#15029
https://github.com/vim/vim/commit/d8c9340fc67ca19f82ec3e77ec38296424e758cf
Cherry-pick syntax.txt change from runtime update.
Diffstat (limited to 'test/old')
-rw-r--r-- | test/old/testdir/test_cmdline.vim | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/old/testdir/test_cmdline.vim b/test/old/testdir/test_cmdline.vim index f83f782817..4a637552a6 100644 --- a/test/old/testdir/test_cmdline.vim +++ b/test/old/testdir/test_cmdline.vim @@ -2923,6 +2923,37 @@ func Test_wildmenu_pum_rightleft() call StopVimInTerminal(buf) endfunc +" Test highlighting matched text in cmdline completion popup menu. +func Test_wildmenu_pum_hl_match() + CheckScreendump + + let lines =<< trim END + set wildoptions=pum,fuzzy + hi PmenuMatchSel ctermfg=6 ctermbg=7 + hi PmenuMatch ctermfg=4 ctermbg=225 + END + call writefile(lines, 'Xwildmenu_pum_hl', 'D') + let buf = RunVimInTerminal('-S Xwildmenu_pum_hl', #{rows: 10, cols: 50}) + + call term_sendkeys(buf, ":sign plc\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_1', {}) + call term_sendkeys(buf, "\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_2', {}) + call term_sendkeys(buf, "\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_3', {}) + call term_sendkeys(buf, "\<Esc>:set wildoptions-=fuzzy\<CR>") + call TermWait(buf) + call term_sendkeys(buf, ":sign un\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_4', {}) + call term_sendkeys(buf, "\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_5', {}) + call term_sendkeys(buf, "\<Tab>") + call VerifyScreenDump(buf, 'Test_wildmenu_pum_hl_match_6', {}) + call term_sendkeys(buf, "\<Esc>") + + call StopVimInTerminal(buf) +endfunc + " Test for completion after a :substitute command followed by a pipe (|) " character func Test_cmdline_complete_substitute() |