diff options
author | Riley Bruins <ribru17@hotmail.com> | 2024-10-10 23:26:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-10 23:26:25 -0700 |
commit | a0e3fe57417f0b7c8de60dcebe44d0cf034c4b9a (patch) | |
tree | caba2efed785b6a9f55e8c8165e2afc266051993 /test/functional/ui/popupmenu_spec.lua | |
parent | 25665b365c2f8f3a81866f500da725e59be10389 (diff) | |
download | rneovim-a0e3fe57417f0b7c8de60dcebe44d0cf034c4b9a.tar.gz rneovim-a0e3fe57417f0b7c8de60dcebe44d0cf034c4b9a.tar.bz2 rneovim-a0e3fe57417f0b7c8de60dcebe44d0cf034c4b9a.zip |
feat(ui): cascading style inheritance for Pmenu* highlights #29980
- `PmenuSel` and `PmenuMatch` inherit from `Pmenu`
- `PmenuMatchSel` inherits from both `PmenuSel` and `PmenuMatch`
Diffstat (limited to 'test/functional/ui/popupmenu_spec.lua')
-rw-r--r-- | test/functional/ui/popupmenu_spec.lua | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index 79788cf295..f128bdc961 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -3636,6 +3636,59 @@ describe('builtin popupmenu', function() :sign un^ | ]]) end) + + it( + 'cascading highlights for matched text (PmenuMatch, PmenuMatchSel) in cmdline pum', + function() + screen:set_default_attr_ids({ + [1] = { foreground = Screen.colors.Blue1, bold = true }, + [2] = { + underline = true, + italic = true, + foreground = Screen.colors.White, + background = Screen.colors.Grey, + }, + [3] = { + foreground = Screen.colors.Red, + background = Screen.colors.Grey, + strikethrough = true, + underline = true, + italic = true, + }, + [4] = { + foreground = Screen.colors.Yellow, + background = Screen.colors.Pink, + bold = true, + underline = true, + italic = true, + }, + [5] = { + foreground = Screen.colors.Black, + background = Screen.colors.White, + bold = true, + underline = true, + italic = true, + strikethrough = true, + }, + }) + exec([[ + set wildoptions=pum,fuzzy + hi Pmenu guifg=White guibg=Grey gui=underline,italic + hi PmenuSel guifg=Red gui=strikethrough + hi PmenuMatch guifg=Yellow guibg=Pink gui=bold + hi PmenuMatchSel guifg=Black guibg=White + ]]) + + feed(':sign plc<Tab>') + screen:expect([[ + | + {1:~ }|*16 + {1:~ }{3: }{5:pl}{3:a}{5:c}{3:e }{1: }| + {1:~ }{2: un}{4:pl}{2:a}{4:c}{2:e }{1: }| + :sign place^ | + ]]) + end + ) end it("'pumheight'", function() |