neovim-qt icon indicating copy to clipboard operation
neovim-qt copied to clipboard

Swap file being deleted on abrupt exit

Open sosmo opened this issue 3 years ago • 1 comments

Hi, looks like killing the neovim-qt process (for example, with kill -KILL {nvim-qt's pid}) causes any swapfiles and thus unsaved changes to be deleted. This is in contrast to neovim itself. Could it be that nvim-qt somehow executes a graceful shutdown of neovim, even when neovim has unsaved files that should be causing a prompt for exit?

nvim-qt --version output:

NVIM-QT v0.2.17.9999 Build type: Release Compilation: -Wall -Wextra -Wno-unused-parameter -std=c++11 -Wfatal-errors Qt Version: 5.12.8 Environment: nvim: nvim args: --cmd let &rtp.=',/usr/local/share/nvim-qt/runtime' --cmd set termguicolors runtime: /usr/local/share/nvim-qt/runtime

NVIM v0.4.3 Build type: Release LuaJIT 2.1.0-beta3 Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-gOb7vg/neovim-0.4.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=1 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim-gOb7vg/neovim-0.4.3/build/config -I/build/neovim-gOb7vg/neovim-0.4.3/src -I/usr/include -I/usr/include/lua5.1 -I/build/neovim-gOb7vg/neovim-0.4.3/build/src/nvim/auto -I/build/neovim-gOb7vg/neovim-0.4.3/build/include Compiled by [email protected]

sosmo avatar Sep 26 '20 21:09 sosmo

I can confirm this behavior on Windows/Linux running master.

Repro Steps:

  1. Start nvim or nvim-qt
  2. Make unsaved changes.
  3. Note location of swap file with :sw
  4. Kill the process with taskkill /f /im nvim-qt.exe or killall nvim-qt

jgehrig avatar Sep 28 '20 04:09 jgehrig