aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/tui_spec.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2023-05-01 20:08:25 +0200
committerLuuk van Baal <luukvbaal@gmail.com>2023-05-03 14:58:25 +0200
commit197827321a39168dbaa143c9f7b4f5db668f893c (patch)
tree59df2204df7c47c19b611417319bd804b3c8bbe4 /test/functional/terminal/tui_spec.lua
parent066db5e7cdaadfb1d2971bdc4b9200f14737d7b6 (diff)
downloadrneovim-197827321a39168dbaa143c9f7b4f5db668f893c.tar.gz
rneovim-197827321a39168dbaa143c9f7b4f5db668f893c.tar.bz2
rneovim-197827321a39168dbaa143c9f7b4f5db668f893c.zip
fix(tui): grid_clear properly clears the screen
Problem: When setting a shell size smaller than the containing terminal window through `:winsize` or `:set lines/columns` the screen is not properly cleared. Solution: Clear the tui dimensions rather than the grid dimensions.
Diffstat (limited to 'test/functional/terminal/tui_spec.lua')
-rw-r--r--test/functional/terminal/tui_spec.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index 069fbad803..5fd3467949 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -2422,6 +2422,19 @@ describe("TUI as a client", function()
{3:-- TERMINAL --} |
]]}
+ -- grid smaller than containing terminal window is cleared properly
+ feed_data(":call setline(1,['a'->repeat(&columns)]->repeat(&lines))\n")
+ feed_data("0:set lines=2\n")
+ screen_server:expect{grid=[[
+ {1:a}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
+ {5:[No Name] [+] }|
+ |
+ |
+ |
+ |
+ {3:-- TERMINAL --} |
+ ]]}
+
feed_data(":q!\n")
server_super:close()