diff options
author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-05-04 15:16:25 -0700 |
---|---|---|
committer | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-05-04 15:43:53 -0700 |
commit | ca058082ae888f66393aa1c9fad7ed749a99bbf9 (patch) | |
tree | a3940c4bb00bec082299a28a7b2e5b7a0cfe8a49 | |
parent | d45e168a1d49a6d7da6ea9384913aec781ec03f2 (diff) | |
download | rneovim-ca058082ae888f66393aa1c9fad7ed749a99bbf9.tar.gz rneovim-ca058082ae888f66393aa1c9fad7ed749a99bbf9.tar.bz2 rneovim-ca058082ae888f66393aa1c9fad7ed749a99bbf9.zip |
tests: floating windows terminate border on edge of viewport when window extends past viewport
-rw-r--r-- | test/functional/ui/float_spec.lua | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index 3e73d8b3de..8d110c1634 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -910,6 +910,57 @@ describe('float window', function() end end) + it('terminates border on edge of viewport when window extends past viewport', function() + local buf = meths.create_buf(false, false) + meths.open_win(buf, false, {relative='editor', width=40, height=7, row=0, col=0, border="single"}) + 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 + {5:┌────────────────────────────────────────┐}| + {5:│}{1: }{5:│}| + {5:│}{2:~ }{5:│}| + {5:│}{2:~ }{5:│}| + {5:│}{2:~ }{5:│}| + {5:│}{2:~ }{5:│}| + {5:│}{2:~ }{5:│}| + {5:│}{2:~ }{5:│}| + {5:└────────────────────────────────────────┘}| + ]], float_pos={ + [4] = { { id = 1001 }, "NW", 1, 0, 0, true } + }, win_viewport={ + [2] = {win = {id = 1000}, topline = 0, botline = 2, curline = 0, curcol = 0}; + [4] = {win = {id = 1001}, topline = 0, botline = 2, curline = 0, curcol = 0}; + }} + else + screen:expect{grid=[[ + {5:^┌──────────────────────────────────────┐}| + {5:│}{1: }{5:│}| + {5:│}{2:~ }{5:│}| + {5:│}{2:~ }{5:│}| + {5:│}{2:~ }{5:│}| + {5:└──────────────────────────────────────┘}| + | + ]]} + end + end) + it('with border show popupmenu', function() screen:try_resize(40,10) local buf = meths.create_buf(false, false) |