mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
Restore ":browse oldfiles" behavior from Vim
In 3b12bb225a, ":oldfiles" was taught to
behave like Vim's ":browse oldfiles" if ":oldfiles!" was used. However,
this conflates the use of ! for abandoning a modified buffer with
choosing one file out of a list of oldfiles.
Now that ":browse" is supported again, ":browse oldfiles" will allow the
user to select an old file, while still complaining if that would cause
a modified buffer to be abandoned. ":browse oldfiles!" will just
abandon the buffer, as expected.
This commit is contained in:
@@ -47,7 +47,7 @@ describe(':oldfiles', function()
|
||||
end)
|
||||
end)
|
||||
|
||||
describe(':oldfiles!', function()
|
||||
describe(':browse oldfiles', function()
|
||||
local filename
|
||||
local filename2
|
||||
local oldfiles
|
||||
@@ -74,7 +74,7 @@ describe(':oldfiles!', function()
|
||||
ok(filename == oldfiles[1] or filename == oldfiles[2])
|
||||
ok(filename2 == oldfiles[1] or filename2 == oldfiles[2])
|
||||
|
||||
execute('oldfiles!')
|
||||
execute('browse oldfiles')
|
||||
end)
|
||||
|
||||
after_each(function()
|
||||
|
||||
Reference in New Issue
Block a user