aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/popupmenu_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-06-18 05:49:33 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-06-18 06:18:34 +0800
commitc429c5f86fb8286bbb28e96985d9cc212155201b (patch)
treeaeb7664e95cac099e98cd9d07cace3ea254e302e /test/functional/ui/popupmenu_spec.lua
parentb60030b7bf3e638ba134550091131fc5229b69a1 (diff)
downloadrneovim-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/functional/ui/popupmenu_spec.lua')
-rw-r--r--test/functional/ui/popupmenu_spec.lua60
1 files changed, 60 insertions, 0 deletions
diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua
index 4ea60194c2..fac863ead0 100644
--- a/test/functional/ui/popupmenu_spec.lua
+++ b/test/functional/ui/popupmenu_spec.lua
@@ -3550,6 +3550,66 @@ describe('builtin popupmenu', function()
|
]])
end)
+
+ -- oldtest: Test_wildmenu_pum_hl_match()
+ it('highlighting matched text in cmdline pum', function()
+ exec([[
+ set wildoptions=pum,fuzzy
+ hi PmenuMatchSel guifg=Blue guibg=Grey
+ hi PmenuMatch guifg=Blue guibg=Magenta
+ ]])
+
+ feed(':sign plc<Tab>')
+ screen:expect([[
+ |
+ {1:~ }|*16
+ {1:~ }{s: }{ms:pl}{s:a}{ms:c}{s:e }{1: }|
+ {1:~ }{n: un}{mn:pl}{n:a}{mn:c}{n:e }{1: }|
+ :sign place^ |
+ ]])
+ feed('<Tab>')
+ screen:expect([[
+ |
+ {1:~ }|*16
+ {1:~ }{n: }{mn:pl}{n:a}{mn:c}{n:e }{1: }|
+ {1:~ }{s: un}{ms:pl}{s:a}{ms:c}{s:e }{1: }|
+ :sign unplace^ |
+ ]])
+ feed('<Tab>')
+ screen:expect([[
+ |
+ {1:~ }|*16
+ {1:~ }{n: }{mn:pl}{n:a}{mn:c}{n:e }{1: }|
+ {1:~ }{n: un}{mn:pl}{n:a}{mn:c}{n:e }{1: }|
+ :sign plc^ |
+ ]])
+ feed('<Esc>')
+ command('set wildoptions-=fuzzy')
+ feed(':sign un<Tab>')
+ screen:expect([[
+ |
+ {1:~ }|*16
+ {1:~ }{s: }{ms:un}{s:define }{1: }|
+ {1:~ }{n: }{mn:un}{n:place }{1: }|
+ :sign undefine^ |
+ ]])
+ feed('<Tab>')
+ screen:expect([[
+ |
+ {1:~ }|*16
+ {1:~ }{n: }{mn:un}{n:define }{1: }|
+ {1:~ }{s: }{ms:un}{s:place }{1: }|
+ :sign unplace^ |
+ ]])
+ feed('<Tab>')
+ screen:expect([[
+ |
+ {1:~ }|*16
+ {1:~ }{n: }{mn:un}{n:define }{1: }|
+ {1:~ }{n: }{mn:un}{n:place }{1: }|
+ :sign un^ |
+ ]])
+ end)
end
it("'pumheight'", function()