fix(drawline): don't draw beyond end of window (#29035)

This commit is contained in:
zeertzjq
2024-05-27 14:37:22 +08:00
committed by GitHub
parent ffbd09ef6a
commit 9a0239fdc8
2 changed files with 44 additions and 8 deletions

View File

@@ -4,6 +4,7 @@ local Screen = require('test.functional.ui.screen')
local spawn, set_session, clear = n.spawn, n.set_session, n.clear
local feed, command = n.feed, n.command
local exec = n.exec
local insert = n.insert
local eq = t.eq
local fn, api = n.fn, n.api
@@ -819,3 +820,39 @@ it("showcmd doesn't cause empty grid_line with redrawdebug=compositor #22593", f
]],
}
end)
it("scrolling in narrow window doesn't draw over separator #29033", function()
clear()
local screen = Screen.new(60, 8)
screen:attach()
feed('100Oa<Esc>gg')
exec([[
set number nowrap
vsplit
set scrollbind
wincmd l
set scrollbind
wincmd |
]])
screen:expect([[
{8: }│{8: 1 }^a |
{8: }│{8: 2 }a |
{8: }│{8: 3 }a |
{8: }│{8: 4 }a |
{8: }│{8: 5 }a |
{8: }│{8: 6 }a |
{2:< }{3:[No Name] [+] }|
|
]])
feed('<C-F>')
screen:expect([[
{8: }│{8: 5 }^a |
{8: }│{8: 6 }a |
{8: }│{8: 7 }a |
{8: }│{8: 8 }a |
{8: }│{8: 9 }a |
{8: }│{8: 10 }a |
{2:< }{3:[No Name] [+] }|
|
]])
end)