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

Fix incorrect cursor location after deleting linebreak (fixes #550) #551

Conversation

thomasboyt
Copy link
Contributor

This fixes the issue I reported in #550, and adds a test to prevent regressions.

@thomasboyt
Copy link
Contributor Author

Looks like the 8 failing tests here are also failing in master.

@@ -590,13 +590,15 @@ class CommandInsertInInsertMode extends BaseCommand {
if (char === "<backspace>") {
if (position.character === 0) {
if (position.line > 0) {
const prevEndOfLine = position.getPreviousLineBegin().getLineEnd();
Copy link
Member

Choose a reason for hiding this comment

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

💯 This fix is truly representative. We should be carefull with TextEditor.delete, etc as they have kind of side effect.

@johnfn
Copy link
Member

johnfn commented Aug 3, 2016

Thanks for the PR, @thomasboyt!

@johnfn johnfn merged commit 9e38fd8 into VSCodeVim:master Aug 3, 2016
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.

3 participants