aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/functional/ui/popupmenu_spec.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua
index 02ac0ada22..26110b559d 100644
--- a/test/functional/ui/popupmenu_spec.lua
+++ b/test/functional/ui/popupmenu_spec.lua
@@ -1179,6 +1179,8 @@ describe('builtin popupmenu', function()
xn = { foreground = Screen.colors.White, background = Screen.colors.Plum1 },
ms = { foreground = Screen.colors.Blue, background = Screen.colors.Grey },
mn = { foreground = Screen.colors.Blue, background = Screen.colors.Plum1 },
+ ds = { foreground = Screen.colors.DarkRed, background = Screen.colors.Grey },
+ dn = { foreground = Screen.colors.DarkRed, background = Screen.colors.Plum1 },
})
screen:attach({ ext_multigrid = multigrid })
end)
@@ -4931,6 +4933,35 @@ describe('builtin popupmenu', function()
feed('<C-E><Esc>')
end)
+
+ -- oldtest: Test_pum_extrahl()
+ it('custom hl_group override', function()
+ exec([[
+ hi StrikeFake guifg=DarkRed
+ 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
+ ]])
+ feed('<ESC>iaw<C-X><C-U>')
+ screen:expect([[
+ aword1^ |
+ {ds:aword1 W extra text 1 }{1: }|
+ {n:aword2 W extra text 2 }{1: }|
+ {dn:你好 W extra text 3 }{1: }|
+ {1:~ }|*15
+ {2:-- }{5:match 1 of 3} |
+ ]])
+ end)
end
end