aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/editor/mark_spec.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/functional/editor/mark_spec.lua b/test/functional/editor/mark_spec.lua
index 8b469286ec..1eb76aa628 100644
--- a/test/functional/editor/mark_spec.lua
+++ b/test/functional/editor/mark_spec.lua
@@ -279,6 +279,27 @@ describe('named marks', function()
-- should still be folded
eq(2, funcs.foldclosed('.'))
end)
+
+ it("getting '{ '} '( ') does not move cursor", function()
+ meths.buf_set_lines(0, 0, 0, true, {'aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'eeeee'})
+ meths.win_set_cursor(0, {2, 0})
+ funcs.getpos("'{")
+ eq({2, 0}, meths.win_get_cursor(0))
+ funcs.getpos("'}")
+ eq({2, 0}, meths.win_get_cursor(0))
+ funcs.getpos("'(")
+ eq({2, 0}, meths.win_get_cursor(0))
+ funcs.getpos("')")
+ eq({2, 0}, meths.win_get_cursor(0))
+ end)
+
+ it('in command range does not move cursor #19248', function()
+ meths.create_user_command('Test', ':', {range = true})
+ meths.buf_set_lines(0, 0, 0, true, {'aaaaa', 'bbbbb', 'ccccc', 'ddddd', 'eeeee'})
+ meths.win_set_cursor(0, {2, 0})
+ command([['{,'}Test]])
+ eq({2, 0}, meths.win_get_cursor(0))
+ end)
end)
describe('named marks view', function()