Skip to content
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

Mapped commands that would exit into normal mode do not propagate in history #3501

Closed
omentic opened this issue Aug 21, 2022 · 4 comments
Closed
Labels
C-bug Category: This is a bug

Comments

@omentic
Copy link
Contributor

omentic commented Aug 21, 2022

Summary

I have many commands like C-s = ":write" set up in my configuration file, as I like having some base level of commands that work across all editors in addition to editor-specific commands. But something that bothers me a lot with Helix right now is that those commands don't increment the undo history.

If I ran :w normally, by exiting insert mode the undo history would be appended to. But since it's directly aliased, normal mode is never inserted and the undo history is never updated.

Reproduction Steps

https://asciinema.org/a/80czKCCbVB3wCja7zQLCCVii0

With this configuration:

[keys.insert]
C-s = ":write"
C-u = "undo"

Helix log

~/.cache/helix/helix.log
please provide a copy of `~/.cache/helix/helix.log` here if possible, you may need to redact some of the lines

Platform

Linux

Terminal Emulator

kitty 0.25.2

Helix Version

helix 22.05

@omentic omentic added the C-bug Category: This is a bug label Aug 21, 2022
@omentic
Copy link
Contributor Author

omentic commented Aug 21, 2022

Related: #1583

@dead10ck
Copy link
Member

dead10ck commented Aug 22, 2022

Related: #2883, and I would point you to my comment in that thread as well

@danielrode
Copy link

Workaround for the write command:

[keys.insert]
C-s = ["commit_undo_checkpoint", ":write"]

@omentic
Copy link
Contributor Author

omentic commented Oct 25, 2024

Fixed by #11062

@omentic omentic closed this as completed Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@dead10ck @danielrode @omentic and others