-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Doesn't support "set confirm" #15
Comments
For anyone else coming across this, I have the same problem (on neovim), and resolved it by switching to https://github.com/famiu/bufdelete.nvim , which also provides Bdelete and prompts if needed. |
It looks like the Line 12 in 25ef93a
If you have if getbufvar(buffer, "&modified") && empty(a:bang)
if !&confirm
let error = "E89: No write since last change for buffer "
return s:error(error . buffer . " (add ! to override)")
endif
endif This got
|
This doesn't respect the if getbufvar(buffer, "&modified") && empty(a:bang)
let confirm_result = confirm("Save changes?", "&Yes\n&No\n&Cancel", 3)
if confirm_result == 1
write
echo "Changes Saved"
elseif confirm_result == 2
edit!
echo "Changes Discarded"
else
echo "Resume Editing"
return
endif
endif |
Hi there.
Loving the plugin. Makes everything infinitely easier and better behaved. The only issue I have right now is that it doesn't support vim's "confirm" option which will prompt on closing an unsaved buffer instead of asking for an exclamation mark. It's extremely handy and would be vastly preferred to the current method(which requires a separate key mapping for force closing).
The text was updated successfully, but these errors were encountered: