While editing a file my neovim crashed when I tried to save the file (with the error message
"init.vim" 77L, 2423C writtennvim(5888,0x7fffa9f29340) malloc: *** error for object 0x7f861301d400: pointer being freed was not allocated), and after that I tried to edit it again, the following dialog is shown.
Swap file "~/.local/share/nvim/swap//%Users%me%.config%nvim%init.vim.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
However, it seems that all of the options I choose lead to the same crash and recover loop, so I tried to delete all the swap files.
cd ~/.local/share/nvim/swap rm -rf *
The swap files are all gone, but even after that, when I tried to open the file, edit, and save it, the same crash occured, and then the swap file is created and the same recovery mode is shown on the next launch.
How can I discard the swap and regain my editing capability without installing it again?