AndrewRadev / sideways.vim

A Vim plugin to move function arguments (and other delimited-by-something items) left and right.
http://www.vim.org/scripts/script.php?script_id=4171
MIT License
479 stars 9 forks source link

More targets than List items #29

Closed bstaint closed 6 years ago

bstaint commented 6 years ago

when sideways#parsing#Parse return []:

Error detected while processing function sideways#MoveLeft:
line    1:
E688: More targets than List items
line    2:
E121: Undefined variable: items
E116: Invalid arguments for function empty(items)
E15: Invalid expression: empty(items)
...

sideways.vim\autoload\sideways\parsing.vim, line 38:

    return [definition []]

instead.

AndrewRadev commented 6 years ago

Good catch, thank you very much for the backtrace and the suggestion -- I've pushed a fix. Could you pull from master and confirm it works right?

bstaint commented 6 years ago

Yes, It's no problem. thx.