-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Item movers need some fixes #8492
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
Comments
Oh, I just noticed that "problem 1" happens because currently when you use item movers over the argument list it moves the order of the arguments. IMO it fells weird to "move up/down" and the argument list be changed, as it is a more "horizontal" thing. It seems to me that the suggestion in #8340 to use "move left/right" to do it is much more natural. Also, when we move the elements in the argument list, the callers are not being changed. That's another good suggestion present there. |
Current cursor algorithm is implemented here: |
@ivan770 about the function you referenced above, isn't the |
There are multiple conditions - one for missing cursor, and one for the cursor in desired direction. If we don't have any cursor - set it. If current range is closer to desired direction - replace cursor |
I've opened #8510 to move the cursor position along with the item it's in |
closes Item movers need some fixes rust-lang#8492
Hey, I really enjoy item movers (#6823), but I think it needs a little polishing.
The problems
These two, in combination, may be annoying, because sometimes my cursor goes to the argument list while I'm moving functions through a file and I have to move the cursor's position back to the function name in order to move it up again.
Example
If I move
hi
up, my cursor goes to column 8. If I move it down, it goes to column 2.Environment
The text was updated successfully, but these errors were encountered: