-
Notifications
You must be signed in to change notification settings - Fork 22
Description
local blah = {
{ 2, 1, 6 },
{ 3, 4, 6 },
{ 3, 4, 6 },
}
If i have nested lists like this, I don't think there is anywhere to place the cursor that would make ISwapWith work with the outer list. In fact, placing the cursor on the braces of one of the inner lists makes iswap think we're trying to work on the inner list (because technically the cursor is contained within the inner list.
Even if this is fixed to work I think the nicer solution is to allow ISwapWith from visual mode and then ISwapWith will try its best to treat the visual range as the cur_node. Basically ignore lists that are contained within the visual range, or if the visual range covers multiple children of a list then we shouldn't operate within that list.
I've actually already started the implementation for a PR but I wanted to post this for discussion and if you agree with the solution?