-
Notifications
You must be signed in to change notification settings - Fork 49
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
Refine undo behavior #64
Comments
…(refs #64) Then, user can't undo some changes in magit buffer made the backend (these changes would only be virtual). But it can still undo some changes when he is typing. Catch undo and make undo really undoing magit commands would be soooo cool, but seems quite difficult to implement.
Hi, there is a first and clean fix about your issue. Actually, you are right, letting the undo thing like this may let the user think that when it presses This patch (that you can try with the branch |
@jebaum did you try this branch? I intend to merge it to next release, let me know your point of view. |
I'll start running that branch now and let you know. Glanced at the code, looks pretty good to me. Is it possible to get around that unwanted fold opening with something like |
…(refs #64) Then, user can't undo some changes in magit buffer made the backend (these changes would only be virtual). But it can still undo some changes when he is typing. Catch undo and make undo really undoing magit commands would be soooo cool, but seems quite difficult to implement.
Well, for the fold opening stuff, are you experiencing this? Are do you based your comment on function comment? The function comment may be unclear, but it says that unwanted unfold may appear if the function is used at the wrong place. |
Pressing
u
does a couple of things that I don't think are ideal:Magit
, it will clear the whole bufferu
If
undo
within the context of the Magit buffer would only undo Magit actions (and same with redo of course) it would improve usability. The above two cases are the only two I've noticed where I hitu
and something I don't want to happen happens, but there may be a couple others I haven't bumped into yet.The only way I can think of to achieve this would be a little bit hacky with
wundo
,rundo
, and the code snippet in:h clear-undo
. I'll try to see if there are better options, or if this could be made optional for people who don't haveundofile
on. It's possible it may not be worth it at all, in which case I may want to explore adding a feature to vim/neovim to enable fine grained control of the undo history.The text was updated successfully, but these errors were encountered: