-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Possible to icorrectly remove dirty buffer state and so quit under certain conditions #9619
Comments
#5733 (comment) is related. We need to call |
Is that as simple as calling |
Yep that should do it. See here in paste where we do the same: helix/helix-term/src/commands.rs Lines 4038 to 4039 in 7934ac7
|
I think I simply missed that function in #5790 (so you should call |
Thanks for the feedback! Opened a PR with those changes. |
Summary
It is possible to get helix to forget that the buffer is dirty and it shouldn't allow quitting without saving under certain conditions. Works with both scratch buffer and when editing a file.
Reproduction Steps
Follow the exact keystrokes:
hx
Inside helix:
i
->h
(any single character insert is fine) -><esc>
->:clipboard-paste-replace<CR>
->u
->u
(at this point the dirty buffer indicator (the plus sign in the status line) goes away ->:q<CR>
This allows you to quit, even though the
h
character is still in the buffer. The steps work for editing a file also with an additional keystroke after the<esc>
to move the cursor onto theh
character.Helix log
~/.cache/helix/helix.log
Platform
Linux
Terminal Emulator
Konsole 23.08.4
Installation Method
Fedora dnf through varlad/helix
Helix Version
helix 23.10 (f6021dd)
The text was updated successfully, but these errors were encountered: