diff options
| author | akovaski <akaskik@gmail.com> | 2020-01-21 02:35:01 -0600 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2020-01-21 00:35:01 -0800 |
| commit | 97dcc48c998ccecaa37a3cbea568d85c2f1407f9 (patch) | |
| tree | c4f5b9b2b658b8b1c94a28a41349e62e3c9524c0 /test/functional/ui/wildmode_spec.lua | |
| parent | 99aec382596bffaa91d0a944dc9474e42331ad93 (diff) | |
| download | rneovim-97dcc48c998ccecaa37a3cbea568d85c2f1407f9.tar.gz rneovim-97dcc48c998ccecaa37a3cbea568d85c2f1407f9.tar.bz2 rneovim-97dcc48c998ccecaa37a3cbea568d85c2f1407f9.zip | |
wildmode: fix wildmode=longest,full with pum #11690
With "wildmode=longest,full" + wildoptions=pum, wildmode should show
popupmenu after Tab-Tab, not the horizontal wildmenu.
Fixes #11622
Diffstat (limited to 'test/functional/ui/wildmode_spec.lua')
| -rw-r--r-- | test/functional/ui/wildmode_spec.lua | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/test/functional/ui/wildmode_spec.lua b/test/functional/ui/wildmode_spec.lua index f3fa711fb1..56987d7bc2 100644 --- a/test/functional/ui/wildmode_spec.lua +++ b/test/functional/ui/wildmode_spec.lua @@ -221,6 +221,106 @@ describe("'wildmenu'", function() ]]) end) + it('wildmode=longest,list', function() + -- Need more than 5 rows, else tabline is covered and will be redrawn. + screen:try_resize(25, 7) + + command('set wildmenu wildmode=longest,list') + + -- give wildmode-longest something to expand to + feed(':sign u<tab>') + screen:expect([[ + | + ~ | + ~ | + ~ | + ~ | + ~ | + :sign un^ | + ]]) + feed('<tab>') -- trigger wildmode list + screen:expect([[ + | + ~ | + ~ | + | + :sign un | + undefine unplace | + :sign un^ | + ]]) + feed('<Esc>') + screen:expect([[ + ^ | + ~ | + ~ | + ~ | + ~ | + ~ | + | + ]]) + + -- give wildmode-longest something it cannot expand, use list + feed(':sign un<tab>') + screen:expect([[ + | + ~ | + ~ | + | + :sign un | + undefine unplace | + :sign un^ | + ]]) + feed('<tab>') + screen:expect_unchanged() + feed('<Esc>') + screen:expect([[ + ^ | + ~ | + ~ | + ~ | + ~ | + ~ | + | + ]]) + end) + + it('wildmode=list,longest', function() + -- Need more than 5 rows, else tabline is covered and will be redrawn. + screen:try_resize(25, 7) + + command('set wildmenu wildmode=list,longest') + feed(':sign u<tab>') + screen:expect([[ + | + ~ | + ~ | + | + :sign u | + undefine unplace | + :sign u^ | + ]]) + feed('<tab>') -- trigger wildmode longest + screen:expect([[ + | + ~ | + ~ | + | + :sign u | + undefine unplace | + :sign un^ | + ]]) + feed('<Esc>') + screen:expect([[ + ^ | + ~ | + ~ | + ~ | + ~ | + ~ | + | + ]]) + end) + it('multiple <C-D> renders correctly', function() screen:try_resize(25, 7) |