-
Notifications
You must be signed in to change notification settings - Fork 515
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
Add neovide_confirm_quit option to confirm before quitting #1247
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
I would enable it by default. |
@viviicat awesome 💪🙏 |
@Shatur personally I like the idea of it being on by default, but since that would change default behavior I think it would be up to the project owner(s). |
This does not seem to work on MacOS 12.3, neither via command-q or via clicking the menu option. |
Just confirming. By default this option is disabled. Did you enable it by using g:neovide_confirm_quit=1?? |
I tried both |
To be safe i'll ask this dump question. Did you build it again from source after the commit containing this functionality was merged? |
Not a dumb question at all! I'm a new user (only found Neovide last week), so I've only ever built the app since after it was merged. |
Okay nice. A further step i would try is to enable it for the active session by entering the vim command |
Appreciate the suggestion. I'd already tried that, but just to verify, tried again. Still closes without a prompt. |
Oh, another question: Do you have a modified buffer open? It won't ask to confirm if nothing requires saving. (It should prompt with anything as simple as typing gibberish into the default buffer) Also, what happens if you just try to manually run |
Good question, and yes! I even used the
That works as expected. |
I guess the event is being bypassed, then. |
@ernie we are not able to reproduce your issue in both windows and mac os. Can you try again with latest neovide. if issue still persists with latest version, it would be helpful if you share a screen recording. 2022-04-16_16-57-15.1.mp4 |
Also "OS"-window closing should trigger it. |
Aha! So, Command-Q didn't trigger it. Only clicking the close button in the top left. That explains it, as I never quit Mac apps using the X I was able to get it "working" by clicking the X. Neither Command-Q nor selecting neovide -> quit neovide worked. |
Yes, this is not saying one must use the X. Command Q should do the thing. I'm not having access to a mac right now. Maybe the fellow thread readers can give some more input. |
I ran with |
This is off topic but this is a wonderful job on desktop customization in this little preview. Didn't knew it's possible to go on Mac that far. Could provide a link or recommend a resource? |
@ernie Thanks for the feedback. good thing we are progressing on finding the root cause.
@tobealive I never used Mac device so far :( . This is verified and shared in neovide discord channel by another community member. You can join in if you are interested. |
Since the last comment, rust-windowing/winit#41 was closed by rust-windowing/winit#1583 . It looks like we are using the fork at neovide/winit on the new-keyboard-all branch. It doesn't look like the commits in that tree are upstream though. |
Yes, and we'll have to wait until we can use upstream's |
This adds a new option,
g:neovide_confirm_quit
(default:0
), which, when set to1
orv:true
, will executeconfirm qa
instead ofqa!
when the window is closed.Mostly fixes #874, by reducing the potential to lose work. It does not pop up a nice dialog box, of course. This is pretty much the way that nvim-qt does things.
Tested on Linux.
Please let me know if there's a more elegant way to query the option than putting it in an inline script.
What kind of change does this PR introduce?
Did this PR introduce a breaking change?