VSCodeVim/Vim
View on GitHubI have overloaded cursorStartPosition to be too many different things.
Open
#805 opened on Sep 27, 2016
help wantedkind/refactorsize/L
Description
Currently cursorStartPosition and cursorPosition can mean both "the start and end of the current selection" and "the range over which to apply an operator".
These are actually totally different! It's especially bad when you apply an operator and then suddenly you lose the tracked position of the cursor.
Move "the range over which to apply an operator" into a new field on RecordedState and use that instead of cursorStartPosition and cursorPosition. Continue using cursorStartPosition and cursorPosition for selections and cursor locations.
My current problem is running ci( on |(abcd), which promptly forgets the position of the cursor and can't (because of the overloading) figure out where to place it.