Describe the bug
bufload() occurs E325 error when swap file exists.
:help bufload() says:
If there is an existing swap file for the file of the buffer,
there will be no dialog, the buffer will be loaded anyway.
E325 is not a dialog, but it stops the running of the script.
I guess there will be no dialog means scripts keep running without any user interaction.
So I thinks this behavior is not expected.
To Reproduce
Detailed steps to reproduce the behavior:
vim --clean test.txtvim --clean:call bufload(bufnr('test.txt', 1)) in second VimExpected behavior
E325 does not occurred.
Screenshots
Environment (please complete the following information):
Additional context
Nothing
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
I'm not sure we want to change this. You can use ":silent!" to not get the error.
You can also use try/catch, but the "Found a swap file" message will still show.
OK. Thank you.
Closed #8333.