mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 15:08:35 +00:00
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.
(cherry picked from commit 197827321a
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
1a104253df
commit
59ee42d05e
@@ -66,10 +66,10 @@ describe('api', function()
|
||||
|
||||
screen:expect([[
|
||||
[tui] insert-mode |
|
||||
[socket 1] this is more t{4: }|
|
||||
han 25 columns {4: }|
|
||||
[socket 2] input{1: } {4: }|
|
||||
{4:~ }|
|
||||
[socket 1] this is more t |
|
||||
han 25 columns |
|
||||
[socket 2] input{1: } |
|
||||
{4:~ } |
|
||||
{3:-- INSERT --} |
|
||||
{3:-- TERMINAL --} |
|
||||
]])
|
||||
|
@@ -2445,6 +2445,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()
|
||||
|
Reference in New Issue
Block a user