-
Notifications
You must be signed in to change notification settings - Fork 239
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
feat: do not close commit message with q
until saved
#607
Conversation
First off, hats off to you for all the recent work! And for fixing that buffer method. Oops. Alright, lets get into this. I think you can combine your efforts with what I started here: #567 Essentially, instead of nudging a user to save, just ask if they want to abort the commit, because that should be allowed. But I like your way to check if the buffer is modified more, so definitely keep that. And don't worry about the As for the commits, thats up to you. A reasonably clean history is nice, without out too many "lint" commits, but... I'm also guilty of those sometimes, so don't worry about it too much. |
|
Oh wait, yeah a dialogue is definitely better. They're hitting |
40c665b
to
dab2157
Compare
Alright, take a look again. I removed the As a heads up |
764162a
to
549da37
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the state of this so far, and the solution is really nice and goes out of your way without trying to do too much surprising side effects behind the scenes (such as saving somewhere)
549da37
to
f916308
Compare
Prior to this commit hitting
q
in normal mode in the commit editor would close it even if the text had not been saved. Also, prior to this commit, theBuffer:get_option
inlib/buffer.lua
never actually returned the option value 😅.This PR pops up a warning when
q
is hit in normal mode and the buffer has unsaved modifications, we may want to change the message and the log level.Currently the message is:
and the log level is set to
WARN
.This PR also fixes the
Buffer:get_option
to actually return the value it got.Let me know if any changes are desired to the message or log level, and secondly I have a question. Do y'all prefer me to force push or to create a separate commit for each change? Usually I try to avoid polluting the git history with a bunch of teeny tiny fix commits, but y'all may prefer that.
Closes #552