mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 19:18:34 +00:00
fix(mark): fix unexpected cursor movements (#19253)
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user