diff options
author | Patrick McFarland <pmcfarland@adterrasperaspera.com> | 2023-03-14 13:21:53 -0400 |
---|---|---|
committer | Patrick McFarland <pmcfarland@adterrasperaspera.com> | 2023-03-19 08:15:04 -0400 |
commit | 3b28fb4cd9e1ef877968b4ffabf4d6b1cb17aa07 (patch) | |
tree | cb43f480bc2eb3b855f5a3210495985b133b73be /test/functional/ui/float_spec.lua | |
parent | eeac80de0cf45951dd696f82e5a823c6de20728c (diff) | |
download | rneovim-3b28fb4cd9e1ef877968b4ffabf4d6b1cb17aa07.tar.gz rneovim-3b28fb4cd9e1ef877968b4ffabf4d6b1cb17aa07.tar.bz2 rneovim-3b28fb4cd9e1ef877968b4ffabf4d6b1cb17aa07.zip |
fix(float): remove -1 in height clamp
Problem: Clamp for height in floating windows enforced no more than
editor height - 1, disallowing full editor height floating windows when
using cmdheight=0
Solution: Clamp to full height, removing the -1. Tested to give the
intended results with cmdheight=0, 1, or more than 1. This also
inadvertently fixes a rendering error with cmdheight >1 where the
bottom border would be overlapped by the cmdline.
Diffstat (limited to 'test/functional/ui/float_spec.lua')
-rw-r--r-- | test/functional/ui/float_spec.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua index 5916c8e238..32f28dce26 100644 --- a/test/functional/ui/float_spec.lua +++ b/test/functional/ui/float_spec.lua @@ -2015,7 +2015,7 @@ describe('float window', function() 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"}) + meths.open_win(buf, false, {relative='editor', width=40, height=7, row=0, col=0, border="single", zindex=201}) if multigrid then screen:expect{grid=[[ ## grid 1 @@ -2046,7 +2046,7 @@ describe('float window', function() {5:│}{2:~ }{5:│}| {5:└────────────────────────────────────────┘}| ]], float_pos={ - [4] = { { id = 1001 }, "NW", 1, 0, 0, true } + [4] = { { id = 1001 }, "NW", 1, 0, 0, true, 201 } }, win_viewport={ [2] = {win = {id = 1000}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; [4] = {win = {id = 1001}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0}; @@ -2058,8 +2058,8 @@ describe('float window', function() {5:│}{2:~ }{5:│}| {5:│}{2:~ }{5:│}| {5:│}{2:~ }{5:│}| + {5:│}{2:~ }{5:│}| {5:└──────────────────────────────────────┘}| - | ]]} end end) @@ -3723,9 +3723,9 @@ describe('float window', function() ]], float_pos=expected_pos} else screen:expect([[ - {1:very } | - {0:~ }{1:^float }{0: }| - | + {1:such } | + {0:~ }{1:very }{0: }| + ^ | ]]) end |