aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/fold_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui/fold_spec.lua')
-rw-r--r--test/functional/ui/fold_spec.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua
index 39a5c10bb7..943cbcef56 100644
--- a/test/functional/ui/fold_spec.lua
+++ b/test/functional/ui/fold_spec.lua
@@ -1,8 +1,10 @@
local helpers = require('test.functional.helpers')(after_each)
local Screen = require('test.functional.ui.screen')
local clear, feed, eq = helpers.clear, helpers.feed, helpers.eq
+local command = helpers.command
local feed_command = helpers.feed_command
local insert = helpers.insert
+local funcs = helpers.funcs
local meths = helpers.meths
describe("folded lines", function()
@@ -26,6 +28,26 @@ describe("folded lines", function()
screen:detach()
end)
+ it("highlighting with relative line numbers", function()
+ command("set relativenumber foldmethod=marker")
+ feed_command("set foldcolumn=2")
+ funcs.setline(1, '{{{1')
+ funcs.setline(2, 'line 1')
+ funcs.setline(3, '{{{1')
+ funcs.setline(4, 'line 2')
+ feed("j")
+ screen:expect([[
+ {7:+ }{5: 1 +-- 2 lines: ·························}|
+ {7:+ }{5: 0 ^+-- 2 lines: ·························}|
+ {7: }{1:~ }|
+ {7: }{1:~ }|
+ {7: }{1:~ }|
+ {7: }{1:~ }|
+ {7: }{1:~ }|
+ :set foldcolumn=2 |
+ ]])
+ end)
+
it("works with multibyte text", function()
-- Currently the only allowed value of 'maxcombine'
eq(6, meths.get_option('maxcombine'))