VSCodeVim/Vim

I have overloaded cursorStartPosition to be too many different things.

Open

#805 opened on Sep 27, 2016

View on GitHub
 (2 comments) (0 reactions) (0 assignees)TypeScript (1,271 forks)batch import
help wantedkind/refactorsize/L

Repository metrics

Stars
 (12,664 stars)
PR merge metrics
 (Avg merge 9d 13h) (7 merged PRs in 30d)

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.

Contributor guide