mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test: use a wider screen in the rightleft winhl test (#22641)
With a wide screen this actually previously caused an overflow.
This commit is contained in:
parent
172227a446
commit
314f20a44f
@ -549,6 +549,7 @@ void grid_put_linebuf(ScreenGrid *grid, int row, int coloff, int endcol, int cle
|
||||
}
|
||||
|
||||
if (bg_attr) {
|
||||
assert(off_from == (size_t)col);
|
||||
for (int c = col; c < endcol; c++) {
|
||||
linebuf_attr[c] = hl_combine_attr(bg_attr, linebuf_attr[c]);
|
||||
}
|
||||
|
@ -1812,19 +1812,28 @@ describe("'winhighlight' highlight", function()
|
||||
]])
|
||||
end)
|
||||
|
||||
it('works for background color in rightleft window in vsplit #22640', function()
|
||||
screen:try_resize(40, 6)
|
||||
it('works for background color in rightleft window #22640', function()
|
||||
-- Use a wide screen to also check that this doesn't overflow linebuf_attr.
|
||||
screen:try_resize(80, 6)
|
||||
insert('aa')
|
||||
command('setlocal rightleft')
|
||||
command('botright vsplit')
|
||||
command('setlocal winhl=Normal:Background1')
|
||||
screen:expect([[
|
||||
aa│{1: ^aa}|
|
||||
{0: ~}│{2: ~}|
|
||||
{0: ~}│{2: ~}|
|
||||
{0: ~}│{2: ~}|
|
||||
{4:[No Name] [+] }{3:[No Name] [+] }|
|
||||
|
|
||||
{1: ^aa}|
|
||||
{2: ~}|
|
||||
{2: ~}|
|
||||
{2: ~}|
|
||||
{2: ~}|
|
||||
|
|
||||
]])
|
||||
command('botright vsplit')
|
||||
screen:expect([[
|
||||
{1: aa│ ^aa}|
|
||||
{2: ~}{1:│}{2: ~}|
|
||||
{2: ~}{1:│}{2: ~}|
|
||||
{2: ~}{1:│}{2: ~}|
|
||||
{4:[No Name] [+] }{3:[No Name] [+] }|
|
||||
|
|
||||
]])
|
||||
end)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user