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

feat: Update <C-u> insert mode behavior #2805

Merged
merged 2 commits into from
Jul 4, 2018
Merged

Conversation

mrwest808
Copy link

@mrwest808 mrwest808 commented Jul 4, 2018

What this PR does / why we need it:
"Fixes" the behavior of <C-u> in Insert mode.

Which issue(s) this PR fixes
Fixes #2804

Special notes for your reviewer:
See issue for reasoning, and let me know if I've missed anything or if you disagree. 🙂

Instead of deleting whole line, it deletes from cursor position, and takes leading indentation into account.
Relates to VSCodeVim#2804
@jpoon
Copy link
Member

jpoon commented Jul 4, 2018

thanks for doing the trifecta: filing an issue, submitting a PR, AND writing tests 👏. Left a comment, but pretty much LGTM.

@@ -172,6 +172,45 @@ suite('Mode Insert', () => {
end: ['foo|bar'],
});

test("Can handle '<C-u>'", async () => {
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason you decided to write the test in this style vs the newTest? IMO, should be OK to have this in the style of the newTest like the ones you have below.

Copy link
Author

Choose a reason for hiding this comment

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

I just mimiced the tests above for <C-w>, I'll change it to the newTest style. 👍

@jpoon jpoon merged commit 762eb01 into VSCodeVim:master Jul 4, 2018
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.

<C-u> doesn't behave as expected in insert mode
3 participants