aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/multigrid_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-02 10:36:41 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-05-02 12:04:49 +0800
commit37b73cf14b118ca1583da2a3e89611222bd3e020 (patch)
treeaa272c916cca3a514bb74b90d157c62fc018052c /test/functional/ui/multigrid_spec.lua
parent03e8b5fc91f9b4b0535f79a8d725e1551aec6795 (diff)
downloadrneovim-37b73cf14b118ca1583da2a3e89611222bd3e020.tar.gz
rneovim-37b73cf14b118ca1583da2a3e89611222bd3e020.tar.bz2
rneovim-37b73cf14b118ca1583da2a3e89611222bd3e020.zip
fix(drawline): make cursorlineopt=screenline work with resized grid
Diffstat (limited to 'test/functional/ui/multigrid_spec.lua')
-rw-r--r--test/functional/ui/multigrid_spec.lua47
1 files changed, 45 insertions, 2 deletions
diff --git a/test/functional/ui/multigrid_spec.lua b/test/functional/ui/multigrid_spec.lua
index 7b2bf30642..9663997a71 100644
--- a/test/functional/ui/multigrid_spec.lua
+++ b/test/functional/ui/multigrid_spec.lua
@@ -39,6 +39,7 @@ describe('ext_multigrid', function()
[20] = {background = Screen.colors.LightGrey},
[21] = {background = Screen.colors.LightMagenta},
[22] = {background = Screen.colors.LightMagenta, bold = true, foreground = Screen.colors.Blue},
+ [23] = {background = Screen.colors.Grey90},
})
end)
@@ -930,7 +931,7 @@ describe('ext_multigrid', function()
end)
it('wraps with grid width', function()
- insert(('b'):rep(80).."\n")
+ insert(('b'):rep(160).."\n")
screen:expect{grid=[[
## grid 1
[2:-----------------------------------------------------]|
@@ -949,7 +950,8 @@ describe('ext_multigrid', function()
[3:-----------------------------------------------------]|
## grid 2
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
- bbbbbbbbbbbbbbbbbbbb |
+ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb|
+ bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb |
^ |
{1:~ }|
{1:~ }|
@@ -967,6 +969,47 @@ describe('ext_multigrid', function()
{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:~ }|
## grid 3
|