-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autowrite when receiving SIGHUP, SIGQUIT #29411
Comments
How often does neovim crash that this becomes relevant lol? Also I don't think it's as obvious as you say that autowrite "should" save on abort. In all cases now autowrite is triggered by a deliberate action by the user, while this will write on any random state it happens to be on. Do the recovery functionality/swap mechanism not essentially fulfill this need anyway? |
Lines 180 to 181 in a2d510e
IIUC, that only writes swap files. For SIGHUP/SIGQUIT (but not others like SIGTERM) maybe it makes sense to also write the buffer contents. |
It’s not relevant for crashes, but the use case that makes me want such a functionality is the following: I wanted a "quick and dirty" neovim scratchpad windows in my desktop environment, and I’m used to quit windows through my DE shorcuts, which calls a SIGHUP. I agree that there are multiple workarounds for this particular usage but as @justinmk says for signals like SIGHUP or SIGQUIT (but not SIGTERM, I agree), I thought it would make more sense that neovim goes through its usual exit sequence as a |
'autowrite' already (should) works like this for Proposal
|
I believe, they should if |
Problem
Currently (at least with neovim 0.10.0) when
autowrite
orautowriteall
is set the buffers are not being written out when neovim receive a deadly signal such as SIGHUP or SIGQUIT.Expected behavior
Neovim should try to write out the buffers as it would with a normal exit in cases like this as this would be what one expects when they set
autowrite
orautowriteall
.The text was updated successfully, but these errors were encountered: