mirror of
https://github.com/neovim/neovim.git
synced 2026-08-30 19:11:52 +00:00
fix(marks): handle switching buffer properly (#25763)
This commit is contained in:
@@ -24,7 +24,6 @@ describe('named marks', function()
|
||||
os.remove(file2)
|
||||
end)
|
||||
|
||||
|
||||
it("can be set", function()
|
||||
command("edit " .. file1)
|
||||
command("mark a")
|
||||
@@ -147,6 +146,20 @@ describe('named marks', function()
|
||||
eq({2, 2}, cursor())
|
||||
end)
|
||||
|
||||
it("can move to them using :'", function()
|
||||
command("args " .. file1 .. " " .. file2)
|
||||
feed("j")
|
||||
feed("ma")
|
||||
feed("G")
|
||||
command("'a")
|
||||
eq({2, 0}, cursor())
|
||||
feed("mA")
|
||||
command("next")
|
||||
command("'A")
|
||||
eq(1, meths.get_current_buf().id)
|
||||
eq({2, 0}, cursor())
|
||||
end)
|
||||
|
||||
it("errors when it can't find the buffer", function()
|
||||
command("args " .. file1 .. " " .. file2)
|
||||
feed("mA")
|
||||
|
||||
Reference in New Issue
Block a user