Skip to content

swap can not swap children across parents #677

Open
@ofseed

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    NEXTissues and PRs relating to the 1.0 refactor on `main`bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions