Error after vim presents "swap file already exist!" options
xbreak opened this issue · comments
xbreak commented
OS
NixOS 21.11
Neovim version
NVIM v0.6.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by nixbld
Features: +acl +iconv +tui
Nvim-tree version
Describe the bug
Opening a file that has a swap file yields the standard vim options:
Found a swap file by the name "~/.local/share/nvim/swap//FILE.swp"
owned by: ME dated: Mon Jan 03 15:12:49 2022
file name: /FILE
modified: no
user name: ME host name: nixos
process ID: 46253 (STILL RUNNING)
While opening file "/FILE"
dated: Mon Jan 03 15:12:41 2022
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /FILE"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/home/ME/.local/share/nvim/swap//FILE.swp"
to avoid this message.
Swap file "~/.local/share/nvim/swap//FILE.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort
After which all options yields an error at the same location.
A yields:
E5108: Error executing lua ...k/myVimPackage/start/nvim-tree-lua/lua/nvim-tree/lib.lua:394: Keyboard interrupt
stack traceback:
[C]: in function 'cmd'
...k/myVimPackage/start/nvim-tree-lua/lua/nvim-tree/lib.lua:394: in function 'open_file'
.../pack/myVimPackage/start/nvim-tree-lua/lua/nvim-tree.lua:180: in function 'on_keypress'
[string ":lua"]:1: in main chunk
O/E yields:
E5108: Error executing lua ...k/myVimPackage/start/nvim-tree-lua/lua/nvim-tree/lib.lua:394: Vim(edit):E325: ATTENTION
stack traceback:
[C]: in function 'cmd'
...k/myVimPackage/start/nvim-tree-lua/lua/nvim-tree/lib.lua:394: in function 'open_file'
.../pack/myVimPackage/start/nvim-tree-lua/lua/nvim-tree.lua:180: in function 'on_keypress'
[string ":lua"]:1: in main chunk
To Reproduce
Open a file in neovim with swap file enabled. Start a new instance and open the same file using nvim-tree.lua to be presented with the options. The error is presented after user selects an option.
Expected behavior
Not produce error for the various options (:edit
command does not) .