aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/fold_spec.lua
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2021-12-09 21:29:15 -0500
committerGitHub <noreply@github.com>2021-12-09 21:29:15 -0500
commitac2d140a33dfe88f882218e15a443b8300cca6b2 (patch)
treee2b724239fa4105e04c15ff964da033a82afa369 /test/functional/ui/fold_spec.lua
parent238da85126c5a1dee03a75b6023a36a9a3642dda (diff)
parentf3fb77c40262f47e30ebefec547f5c6f83ff58e6 (diff)
downloadrneovim-ac2d140a33dfe88f882218e15a443b8300cca6b2.tar.gz
rneovim-ac2d140a33dfe88f882218e15a443b8300cca6b2.tar.bz2
rneovim-ac2d140a33dfe88f882218e15a443b8300cca6b2.zip
Merge pull request #16541 from jamessan/vim-8.2.3664
vim-patch:8.2.3664,8.2.3743,8.2.3747,8.2.3748,8.2.3757
Diffstat (limited to 'test/functional/ui/fold_spec.lua')
-rw-r--r--test/functional/ui/fold_spec.lua112
1 files changed, 112 insertions, 0 deletions
diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua
index 249686234c..3e0e15c2b7 100644
--- a/test/functional/ui/fold_spec.lua
+++ b/test/functional/ui/fold_spec.lua
@@ -41,6 +41,7 @@ describe("folded lines", function()
[9] = {bold = true, foreground = Screen.colors.Brown},
[10] = {background = Screen.colors.LightGrey, underline = true},
[11] = {bold=true},
+ [12] = {background = Screen.colors.Grey90},
})
end)
@@ -84,6 +85,117 @@ describe("folded lines", function()
end
end)
+ it("highlights with CursorLineFold when 'cursorline' is set", function()
+ command("set cursorline foldcolumn=2 foldmethod=marker")
+ command("hi link CursorLineFold Search")
+ insert(content1)
+ feed("zf3j")
+ if multigrid then
+ screen:expect([[
+ ## grid 1
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [3:---------------------------------------------]|
+ ## grid 2
+ {7: }This is a |
+ {7: }valid English |
+ {7: }sentence composed by |
+ {7: }an exhausted developer |
+ {7: }in his cave. |
+ {6: }{12:^ }|
+ {1:~ }|
+ ## grid 3
+ |
+ ]])
+ else
+ screen:expect([[
+ {7: }This is a |
+ {7: }valid English |
+ {7: }sentence composed by |
+ {7: }an exhausted developer |
+ {7: }in his cave. |
+ {6: }{12:^ }|
+ {1:~ }|
+ |
+ ]])
+ end
+ feed("k")
+ if multigrid then
+ screen:expect([[
+ ## grid 1
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [3:---------------------------------------------]|
+ ## grid 2
+ {7: }This is a |
+ {7: }valid English |
+ {7: }sentence composed by |
+ {7: }an exhausted developer |
+ {6: }{12:^in his cave. }|
+ {7: } |
+ {1:~ }|
+ ## grid 3
+ |
+ ]])
+ else
+ screen:expect([[
+ {7: }This is a |
+ {7: }valid English |
+ {7: }sentence composed by |
+ {7: }an exhausted developer |
+ {6: }{12:^in his cave. }|
+ {7: } |
+ {1:~ }|
+ |
+ ]])
+ end
+ command("set cursorlineopt=line")
+ if multigrid then
+ screen:expect([[
+ ## grid 1
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [2:---------------------------------------------]|
+ [3:---------------------------------------------]|
+ ## grid 2
+ {7: }This is a |
+ {7: }valid English |
+ {7: }sentence composed by |
+ {7: }an exhausted developer |
+ {7: }{12:^in his cave. }|
+ {7: } |
+ {1:~ }|
+ ## grid 3
+ |
+ ]])
+ else
+ screen:expect([[
+ {7: }This is a |
+ {7: }valid English |
+ {7: }sentence composed by |
+ {7: }an exhausted developer |
+ {7: }{12:^in his cave. }|
+ {7: } |
+ {1:~ }|
+ |
+ ]])
+ end
+ end)
+
it("highlighting with relative line numbers", function()
command("set relativenumber cursorline cursorlineopt=number foldmethod=marker")
feed_command("set foldcolumn=2")