-
Notifications
You must be signed in to change notification settings - Fork 100
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
When Undotree window is open, executing macro with a count causes multiple changes #111
Comments
this is interesting. Looks like some of the auto commands might changed the undo behaviour. |
Was this ever resolved? I am seeing this is on nvim 0.10 nightly with latest undo tree. |
it's not |
Any idea what mere the issue might be? Interesting in having a stab at this at some point. Currently having to restart without Undotree loaded when I want to run macros like this. |
initially I think it might due to some autocommands that triggered a undo node creation, like exiting/entering insertion mode will do that. But that's only when the undotree panel is open. If you have to disable the plugin then I believe something else is wrong because when undotree panel is not open the auto commands shouldn't be registered. Do you mind check the auto commands by running |
Nothing that could be related to undotree on
|
yeah it looks normal. so you're having this issue without opening the undotree panel right? |
Actually I just realized I don't have this same issue as OP. OP was talking about undo tree being open in a single buffer. My issue is actually when repeating a macro over multiple files. I'll write up a proper issue for you later with repro steps for that. Basically doing something like |
undotree gets opened? is there any hotkey that opens the panel getting accidently recorded? |
Yes it was being opened. Was able to reproduce reliably. Was just doing a find and replace of an array attribute across multiple files. Undotree did not open while recording the macro, nor while manually replaying it. But it did when using |
that's interesting... |
Not sure what happened, but now I am really unable to reproduce it.. |
Steps to reproduce
:UndotreeShow
qq
to record macro in register qothis is a test<Esc>q
to type text in a new line and stop recording macro5@q
to execute macro 5 times.Actual: Five new changes are added to the undo list
Expected: One change is added to the undo list (this is how it works when the Undotree window is closed)
Video:
The text was updated successfully, but these errors were encountered: