diff options
| author | Björn Linse <bjorn.linse@gmail.com> | 2019-06-03 12:10:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-06-03 12:10:28 +0200 |
| commit | 3273e39db62987ae8bb0c617f70c15d3d7bbab68 (patch) | |
| tree | 0e28dcac109f75d8f393408d796a21e0ae15b8af /test/functional/ui/wildmode_spec.lua | |
| parent | f046f3a2396ea23e53e7307e8c143dc646f5273c (diff) | |
| parent | 3d24bb48e71315546da0cb4518fe9229cac402f3 (diff) | |
| download | rneovim-3273e39db62987ae8bb0c617f70c15d3d7bbab68.tar.gz rneovim-3273e39db62987ae8bb0c617f70c15d3d7bbab68.tar.bz2 rneovim-3273e39db62987ae8bb0c617f70c15d3d7bbab68.zip | |
Merge pull request #10107 from gelguy/c_ctrl_d
Fix multiple <C-D> showing statusline on previous completion list
Diffstat (limited to 'test/functional/ui/wildmode_spec.lua')
| -rw-r--r-- | test/functional/ui/wildmode_spec.lua | 53 |
1 files changed, 40 insertions, 13 deletions
diff --git a/test/functional/ui/wildmode_spec.lua b/test/functional/ui/wildmode_spec.lua index 75b5ea9476..914256224f 100644 --- a/test/functional/ui/wildmode_spec.lua +++ b/test/functional/ui/wildmode_spec.lua @@ -15,9 +15,6 @@ describe("'wildmenu'", function() screen = Screen.new(25, 5) screen:attach() end) - after_each(function() - screen:detach() - end) -- expect the screen stayed unchanged some time after first seen success local function expect_stay_unchanged(args) @@ -170,9 +167,7 @@ describe("'wildmenu'", function() it('wildmode=list,full and display+=msgsep interaction #10092', function() -- Need more than 5 rows, else tabline is covered and will be redrawn. - screen:detach() - screen = Screen.new(25, 7) - screen:attach() + screen:try_resize(25, 7) command('set display+=msgsep') command('set wildmenu wildmode=list,full') @@ -211,9 +206,7 @@ describe("'wildmenu'", function() it('wildmode=list,full and display-=msgsep interaction', function() -- Need more than 5 rows, else tabline is covered and will be redrawn. - screen:detach() - screen = Screen.new(25, 7) - screen:attach() + screen:try_resize(25, 7) command('set display-=msgsep') command('set wildmenu wildmode=list,full') @@ -248,6 +241,44 @@ describe("'wildmenu'", function() | ]]) end) + + it('multiple <C-D> renders correctly', function() + screen:try_resize(25, 7) + + command('set laststatus=2') + command('set display+=msgsep') + feed(':set wildm') + feed('<c-d>') + screen:expect([[ + | + ~ | + ~ | + | + :set wildm | + wildmenu wildmode | + :set wildm^ | + ]]) + feed('<c-d>') + screen:expect([[ + | + | + :set wildm | + wildmenu wildmode | + :set wildm | + wildmenu wildmode | + :set wildm^ | + ]]) + feed('<Esc>') + screen:expect([[ + ^ | + ~ | + ~ | + ~ | + ~ | + [No Name] | + | + ]]) + end) end) describe('command line completion', function() @@ -324,10 +355,6 @@ describe('ui/ext_wildmenu', function() screen:attach({rgb=true, ext_wildmenu=true}) end) - after_each(function() - screen:detach() - end) - it('works with :sign <tab>', function() local expected = { 'define', |
