diff options
author | glepnir <glephunter@gmail.com> | 2024-07-27 17:57:19 +0800 |
---|---|---|
committer | glepnir <glephunter@gmail.com> | 2024-07-27 18:05:37 +0800 |
commit | f132f8e9d43e3e5f56079bcae40d87b871d7b61b (patch) | |
tree | 83cc7df6dd6a2de04464ece1b9c76e6de0ad00ab /test/old | |
parent | aa853f362addded400d52d8fdfe5247c300c0e89 (diff) | |
download | rneovim-f132f8e9d43e3e5f56079bcae40d87b871d7b61b.tar.gz rneovim-f132f8e9d43e3e5f56079bcae40d87b871d7b61b.tar.bz2 rneovim-f132f8e9d43e3e5f56079bcae40d87b871d7b61b.zip |
vim-patch:9.1.0618: cannot mark deprecated attributes in completion menu
Problem: cannot mark deprecated attributes in completion menu
Solution: add hl_group to the Dictionary of supported completion fields
(glepnir)
closes: vim/vim#15314
https://github.com/vim/vim/commit/508e7856ec4afc9d6038b14bb6893668268dccab
Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'test/old')
-rw-r--r-- | test/old/testdir/test_popup.vim | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/old/testdir/test_popup.vim b/test/old/testdir/test_popup.vim index 20d96a99ea..6881abcc0f 100644 --- a/test/old/testdir/test_popup.vim +++ b/test/old/testdir/test_popup.vim @@ -1506,4 +1506,33 @@ func Test_pum_highlights_match() call StopVimInTerminal(buf) endfunc +func Test_pum_extrahl() + CheckScreendump + let lines =<< trim END + hi StrikeFake ctermfg=9 + func CompleteFunc( findstart, base ) + if a:findstart + return 0 + endif + return { + \ 'words': [ + \ { 'word': 'aword1', 'menu': 'extra text 1', 'kind': 'W', 'extrahl': 'StrikeFake' }, + \ { 'word': 'aword2', 'menu': 'extra text 2', 'kind': 'W', }, + \ { 'word': '你好', 'menu': 'extra text 3', 'kind': 'W', 'extrahl': 'StrikeFake' }, + \]} + endfunc + set completeopt=menu + set completefunc=CompleteFunc + 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 VerifyScreenDump(buf, 'Test_pum_highlights_12', {}) + call term_sendkeys(buf, "\<C-E>\<Esc>u") + call TermWait(buf) + call StopVimInTerminal(buf) +endfunc + " vim: shiftwidth=2 sts=2 expandtab |