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 #1196, #1197: d}/y} not working correctly #1621

Merged
merged 4 commits into from
May 10, 2017

Conversation

Chillee
Copy link
Member

@Chillee Chillee commented May 1, 2017

This fixes #1196, which was a lot harder than it seemed. I also refactored a tiny part of modeHandler that made it very difficult/impossible to fix this.

I also fixed #1197

However, the fix also actually broke a test, but I think it actually broke the test so it actually has correct behavior now! I've committed the test I changed as well.

@Chillee Chillee changed the title Fixes #1196 and some refactoring? Fixes #1196, #1197 May 1, 2017
@@ -1256,11 +1256,7 @@ export class ModeHandler implements vscode.Disposable {
}

if (!cachedMode.isVisualMode && cachedRegister !== RegisterMode.LineWise) {
if (Position.EarlierOf(start, stop) === start) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bizarre if condition, considering that we set start to the earlier of [start, stop], unless start is equal to stop.

@Chillee Chillee changed the title Fixes #1196, #1197 Fixes #1196, #1197: d}/y} not working correctly May 2, 2017
@johnfn
Copy link
Member

johnfn commented May 9, 2017

If you say this is good to go then I am good with merging it. :)

@Chillee
Copy link
Member Author

Chillee commented May 9, 2017

Lemme add a couple more integration tests, and then it should be good to go. Thanks!

@Chillee
Copy link
Member Author

Chillee commented May 9, 2017

Alright repushed my tests (that I didn't push before). This should be good to go!

@xconverge xconverge merged commit 09b50ab into VSCodeVim:master May 10, 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.

y}p handles newlines incorrectly d} deletes extra (empty) line
4 participants