aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/float_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-11-06 22:32:28 +0100
committerGitHub <noreply@github.com>2021-11-06 22:32:28 +0100
commit77c54fc99558e2cd46051095988e753f4373c7a9 (patch)
treebc1ba28138c53f9141da5355b2f15e7dda5681c6 /test/functional/ui/float_spec.lua
parent03b805aee617f67eb7f33a54822bc76c23a2c5f5 (diff)
parent7ff1bc18a978d30f70db157be6f5fb2fb52b4215 (diff)
downloadrneovim-77c54fc99558e2cd46051095988e753f4373c7a9.tar.gz
rneovim-77c54fc99558e2cd46051095988e753f4373c7a9.tar.bz2
rneovim-77c54fc99558e2cd46051095988e753f4373c7a9.zip
Merge pull request #16155 from zeertzjq/fix-redr-border-corruption
fix(float): fix potential heap corruption in win_redr_border
Diffstat (limited to 'test/functional/ui/float_spec.lua')
-rw-r--r--test/functional/ui/float_spec.lua43
1 files changed, 43 insertions, 0 deletions
diff --git a/test/functional/ui/float_spec.lua b/test/functional/ui/float_spec.lua
index 6c2c4b398a..b6d80616b4 100644
--- a/test/functional/ui/float_spec.lua
+++ b/test/functional/ui/float_spec.lua
@@ -1194,6 +1194,49 @@ describe('float window', function()
]]}
end
+ meths.win_set_config(win, {border={"", "_", "", "", "", "-", "", ""}})
+ 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 5
+ {5:_________}|
+ {1: halloj! }|
+ {1: BORDAA }|
+ {5:---------}|
+ ]], float_pos={
+ [5] = { { id = 1002 }, "NW", 1, 2, 5, true }
+ }, win_viewport={
+ [2] = {win = {id = 1000}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1};
+ [5] = {win = {id = 1002}, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 2};
+ }}
+ else
+ screen:expect{grid=[[
+ ^ |
+ {0:~ }|
+ {0:~ }{5:_________}{0: }|
+ {0:~ }{1: halloj! }{0: }|
+ {0:~ }{1: BORDAA }{0: }|
+ {0:~ }{5:---------}{0: }|
+ |
+ ]]}
+ end
+
insert [[
neeed some dummy
background text