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

swap can not swap children across parents #677

Open
ofseed opened this issue Aug 31, 2024 · 0 comments
Open

swap can not swap children across parents #677

ofseed opened this issue Aug 31, 2024 · 0 comments
Labels
bug Something isn't working NEXT issues and PRs relating to the 1.0 refactor on `main`

Comments

@ofseed
Copy link

ofseed commented Aug 31, 2024

To record a regression I found while refactoring main.

function f1(arg1, arg2)
  ...
end

function f2(arg3, arg4)
  ...
end

Formerly if we call swap_next("@parameter.inner") while the cursor is at arg2, nothing will happen, because there's no next parameter in the same parent node. Now it will swap with arg3 in f2 because it is the next parameter even though they do not have a common parent node.

Currently, it seems not possible to do this because we only record nodes' range, but it should be easily fixed if we complete #674.

@ofseed ofseed added the bug Something isn't working label Aug 31, 2024
@clason clason changed the title [main] swap can now swap children across parents [main] swap can not swap children across parents Sep 3, 2024
@clason clason added the NEXT issues and PRs relating to the 1.0 refactor on `main` label Sep 3, 2024
@clason clason changed the title [main] swap can not swap children across parents swap can not swap children across parents Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working NEXT issues and PRs relating to the 1.0 refactor on `main`
Projects
None yet
Development

No branches or pull requests

2 participants