diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-05-18 13:51:59 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-05-18 20:16:18 +0200 |
commit | 17758fe7ad0d5db54dc43e364d53f637a148e73f (patch) | |
tree | 2b4925268f561dd176baf17bbf9d1d810407cd95 /test/functional/ui/float_spec.lua | |
parent | c28192e6f9c16de3add78c5ecf8e732c241f945a (diff) | |
download | rneovim-17758fe7ad0d5db54dc43e364d53f637a148e73f.tar.gz rneovim-17758fe7ad0d5db54dc43e364d53f637a148e73f.tar.bz2 rneovim-17758fe7ad0d5db54dc43e364d53f637a148e73f.zip |
fix(ui): make winbar work with floats and multigrid
Diffstat (limited to 'test/functional/ui/float_spec.lua')
-rw-r--r-- | test/functional/ui/float_spec.lua | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index 7ab00e74d9..03170c79e6 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -7591,6 +7591,53 @@ describe('float window', function() ]]} end end) + + it('can use winbar', function() + local buf = meths.create_buf(false,false) + local win1 = meths.open_win(buf, false, {relative='editor', width=15, height=3, row=1, col=5}) + meths.win_set_option(win1, 'winbar', 'floaty bar') + + if multigrid then + screen:expect{grid=[[ + ## grid 1 + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [2:----------------------------------------]| + [3:----------------------------------------]| + ## grid 2 + ^ | + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + ## grid 3 + | + ## grid 4 + {3:floaty bar }| + {1: }| + {2:~ }| + ]], float_pos={ + [4] = {{id = 1001}, "NW", 1, 1, 5, true, 50}; + }, win_viewport={ + [2] = {win = {id = 1000}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1}; + [4] = {win = {id = 1001}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1}; + }} + else + screen:expect{grid=[[ + ^ | + {0:~ }{3:floaty bar }{0: }| + {0:~ }{1: }{0: }| + {0:~ }{2:~ }{0: }| + {0:~ }| + {0:~ }| + | + ]]} + end + end) end describe('with ext_multigrid', function() |