mirror of
https://github.com/neovim/neovim.git
synced 2025-01-01 17:23:36 -07:00
fix(drawline): make cursorlineopt=screenline work with resized grid
(cherry picked from commit 37b73cf14b
)
This commit is contained in:
parent
c693df02b3
commit
5b158b9375
@ -168,7 +168,7 @@ static void margin_columns_win(win_T *wp, int *left_col, int *right_col)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
width1 = wp->w_width - cur_col_off;
|
width1 = wp->w_width_inner - cur_col_off;
|
||||||
width2 = width1 + win_col_off2(wp);
|
width2 = width1 + win_col_off2(wp);
|
||||||
|
|
||||||
*left_col = 0;
|
*left_col = 0;
|
||||||
|
@ -39,6 +39,7 @@ describe('ext_multigrid', function()
|
|||||||
[20] = {background = Screen.colors.LightGrey},
|
[20] = {background = Screen.colors.LightGrey},
|
||||||
[21] = {background = Screen.colors.LightMagenta},
|
[21] = {background = Screen.colors.LightMagenta},
|
||||||
[22] = {background = Screen.colors.LightMagenta, bold = true, foreground = Screen.colors.Blue},
|
[22] = {background = Screen.colors.LightMagenta, bold = true, foreground = Screen.colors.Blue},
|
||||||
|
[23] = {background = Screen.colors.Grey90},
|
||||||
})
|
})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -930,7 +931,7 @@ describe('ext_multigrid', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it('wraps with grid width', function()
|
it('wraps with grid width', function()
|
||||||
insert(('b'):rep(80).."\n")
|
insert(('b'):rep(160).."\n")
|
||||||
screen:expect{grid=[[
|
screen:expect{grid=[[
|
||||||
## grid 1
|
## grid 1
|
||||||
[2:-----------------------------------------------------]|
|
[2:-----------------------------------------------------]|
|
||||||
@ -949,7 +950,8 @@ describe('ext_multigrid', function()
|
|||||||
[3:-----------------------------------------------------]|
|
[3:-----------------------------------------------------]|
|
||||||
## grid 2
|
## grid 2
|
||||||
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
|
||||||
bbbbbbbbbbbbbbbbbbbb |
|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
|
||||||
|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
||||||
^ |
|
^ |
|
||||||
{1:~ }|
|
{1:~ }|
|
||||||
{1:~ }|
|
{1:~ }|
|
||||||
@ -967,6 +969,47 @@ describe('ext_multigrid', function()
|
|||||||
{1:~ }|
|
{1:~ }|
|
||||||
{1:~ }|
|
{1:~ }|
|
||||||
{1:~ }|
|
{1:~ }|
|
||||||
|
## grid 3
|
||||||
|
|
|
||||||
|
]]}
|
||||||
|
feed('2gk')
|
||||||
|
command('setlocal cursorline cursorlineopt=screenline')
|
||||||
|
screen:expect{grid=[[
|
||||||
|
## grid 1
|
||||||
|
[2:-----------------------------------------------------]|
|
||||||
|
[2:-----------------------------------------------------]|
|
||||||
|
[2:-----------------------------------------------------]|
|
||||||
|
[2:-----------------------------------------------------]|
|
||||||
|
[2:-----------------------------------------------------]|
|
||||||
|
[2:-----------------------------------------------------]|
|
||||||
|
[2:-----------------------------------------------------]|
|
||||||
|
[2:-----------------------------------------------------]|
|
||||||
|
[2:-----------------------------------------------------]|
|
||||||
|
[2:-----------------------------------------------------]|
|
||||||
|
[2:-----------------------------------------------------]|
|
||||||
|
[2:-----------------------------------------------------]|
|
||||||
|
{11:[No Name] [+] }|
|
||||||
|
[3:-----------------------------------------------------]|
|
||||||
|
## grid 2
|
||||||
|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
|
||||||
|
{23:^bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb}|
|
||||||
|
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
|
||||||
|
|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
|
{1:~ }|
|
||||||
{1:~ }|
|
{1:~ }|
|
||||||
## grid 3
|
## grid 3
|
||||||
|
|
|
|
||||||
|
Loading…
Reference in New Issue
Block a user