You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When using bufdelete close all on multiple unsaved buffers, and choosing cancel when the prompt shows up, bufdelete continues to try to close the following buffers as well.
This behavior is a little strange, if I would want to save the buffer, I would have chosen yes, if I wanted to discard the changes, I would have chosen no. If I chose cancel/Ctrl-C the logical thing would be cancel the whole bulk operation and let the user perform any modifications they might deem necessary before proceeding.
This would allow a user to define an autocommand on PreExit to call bufdelete all and get a prompt for each unsaved buffer, deciding if he would like to save the changes or not, and also allowing to cancel the whole operation and stop nvim from exiting. This behavior is the normal behavior in numerous application including office applications preventing unintentional data loss.
Describe the solution you'd like
I will be publishing a PR shortly with the change I am proposing.
The solution would be to stop bufdelete from trying to close any additional buffers after a user selects Cancel once or hits Ctrl-C
Describe alternatives you've considered
I can try to call bufdelete on each buffer separately during my autocommand, however isn't the bufdelete all functionality does exactly that?
Did you check the docs?
Is your feature request related to a problem? Please describe.
When using bufdelete close all on multiple unsaved buffers, and choosing cancel when the prompt shows up, bufdelete continues to try to close the following buffers as well.
This behavior is a little strange, if I would want to save the buffer, I would have chosen yes, if I wanted to discard the changes, I would have chosen no. If I chose cancel/Ctrl-C the logical thing would be cancel the whole bulk operation and let the user perform any modifications they might deem necessary before proceeding.
This would allow a user to define an autocommand on PreExit to call bufdelete all and get a prompt for each unsaved buffer, deciding if he would like to save the changes or not, and also allowing to cancel the whole operation and stop nvim from exiting. This behavior is the normal behavior in numerous application including office applications preventing unintentional data loss.
Describe the solution you'd like
I will be publishing a PR shortly with the change I am proposing.
The solution would be to stop bufdelete from trying to close any additional buffers after a user selects Cancel once or hits Ctrl-C
Describe alternatives you've considered
I can try to call bufdelete on each buffer separately during my autocommand, however isn't the bufdelete all functionality does exactly that?
Additional context
The text was updated successfully, but these errors were encountered: