-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
dot to repeat gets confused if selection is from bottom up #549
Comments
The issue is that we need to emulate vim's behavior here more closely: http://vimdoc.sourceforge.net/htmldoc/visual.html#visual-repeat |
Hey all, Has anyone started working on a fix for this, or at least has an idea about how it should be fixed? I started looking at it (for me this is quite an inconvenience, I use this series of movements quite a lot), but so far I'm just getting familiar with the code base. 😃 |
@markvincze I looked into fixing this a while back, and it's a little bit tricky. The fundamental problem is that we treat the dot operator much like a macro. When you press dot, we repeat the last actions that belong to the current operator. This is mostly stuff related to our concept of "history". However, dot repeat on visual operators is supposed to repeat the same action on the same "amount of text". We don't have this concept currently coded, so it's a bit tricky. Check |
Any update on this? |
@Armour not from my side, I spent some time getting familiar with the code, but it was too involved and I didn't have more time to spend on it. |
fixed in #2790 |
What did you do?
open any file with say 10 lines in it.
GV3j>
This indents the correct three lines and leaving the cursor at line 7, now pressing.
to repeat the indentation indents linesquick demo here, each indent after the first one is just me pressing
.
to repeat the actionWhat did you expect to happen?
The action should repeat over the same lines
What happened instead?
Technical details:
The command indents the correct number of lines but but remembers the "direction" of the selection so it indents the lines above the cursor
The text was updated successfully, but these errors were encountered: