diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-12-17 12:40:30 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-12-18 08:15:31 +0800 |
commit | c830901e8cde49467d1c99c2d656a13e51979790 (patch) | |
tree | 26e8ec89d933f4697f7ee5bd9e3feaae4d442f8c /test | |
parent | 0dd933265ff2e64786fd30f949e767e10f401519 (diff) | |
download | rneovim-c830901e8cde49467d1c99c2d656a13e51979790.tar.gz rneovim-c830901e8cde49467d1c99c2d656a13e51979790.tar.bz2 rneovim-c830901e8cde49467d1c99c2d656a13e51979790.zip |
vim-patch:9.1.0936: cannot highlight completed text
Problem: cannot highlight completed text
Solution: (optionally) highlight auto-completed text using the
ComplMatchIns highlight group (glepnir)
closes: vim/vim#16173
https://github.com/vim/vim/commit/6a38aff218f5b99a1aed7edaa357df24b9092734
Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_popup.vim | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim index a24e133ce6..4f5b769ace 100644 --- a/test/old/testdir/test_popup.vim +++ b/test/old/testdir/test_popup.vim @@ -1713,4 +1713,49 @@ func Test_pum_keep_select() call StopVimInTerminal(buf) endfunc +func Test_pum_matchins_higlight() + CheckScreendump + let lines =<< trim END + func Omni_test(findstart, base) + if a:findstart + return col(".") + endif + return [#{word: "foo"}, #{word: "bar"}, #{word: "你好"}] + endfunc + set omnifunc=Omni_test + hi ComplMatchIns ctermfg=red + END + call writefile(lines, 'Xscript', 'D') + let buf = RunVimInTerminal('-S Xscript', {}) + + call TermWait(buf) + call term_sendkeys(buf, "S\<C-X>\<C-O>") + call VerifyScreenDump(buf, 'Test_pum_matchins_01', {}) + call term_sendkeys(buf, "\<C-E>\<Esc>") + + call TermWait(buf) + call term_sendkeys(buf, "S\<C-X>\<C-O>\<C-N>") + call VerifyScreenDump(buf, 'Test_pum_matchins_02', {}) + call term_sendkeys(buf, "\<C-E>\<Esc>") + + call TermWait(buf) + call term_sendkeys(buf, "S\<C-X>\<C-O>\<C-N>\<C-N>") + call VerifyScreenDump(buf, 'Test_pum_matchins_03', {}) + call term_sendkeys(buf, "\<C-E>\<Esc>") + + " restore after accept + call TermWait(buf) + call term_sendkeys(buf, "S\<C-X>\<C-O>\<C-Y>") + call VerifyScreenDump(buf, 'Test_pum_matchins_04', {}) + call term_sendkeys(buf, "\<C-E>\<Esc>") + + " restore after cancel completion + call TermWait(buf) + call term_sendkeys(buf, "S\<C-X>\<C-O>\<Space>") + call VerifyScreenDump(buf, 'Test_pum_matchins_05', {}) + call term_sendkeys(buf, "\<C-E>\<Esc>") + + call StopVimInTerminal(buf) +endfunc + " vim: shiftwidth=2 sts=2 expandtab |