Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1137: i_<C-w> deletes through whitespace at beginning of line #1624

Merged
merged 3 commits into from
May 2, 2017

Conversation

Chillee
Copy link
Member

@Chillee Chillee commented May 2, 2017

I was really really hoping we could reuse code from 'diw' or something like that, but basically, this is the behavior we want from .

Get the closest to you of either the beginning of the line or the beginning of the first word to the left of your current position (including your current word if you're on a word), or a newline.

It doesn't really fit well into how we're handling word boundaries anywhere else.

I also added a position utility function to determine whether the current position is in leading whitespace of a line.

Speaking of which, we really need to explain what some of our utility functions do. A lot of them are pretty self explanatory, but one that keeps tripping me up is position.getLastWordEnd()

Failed tests are not this PR's issue (pretty sure).

@johnfn johnfn merged commit ea71af5 into VSCodeVim:master May 2, 2017
@Chillee Chillee changed the title Fixes #1137 Fixes #1137: i_<C-w> deletes through whitespace at beginning of line May 2, 2017
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants