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 arrow navigation to EOL while in insert #838

Merged
merged 3 commits into from
Oct 5, 2016
Merged

Fixes arrow navigation to EOL while in insert #838

merged 3 commits into from
Oct 5, 2016

Conversation

xconverge
Copy link
Member

Yay! We love PRs! 🎊

Please include a description of your change and ensure:

  • Commit message has a short title & issue references
  • Each commit does a logical chunk of work.
  • It builds and tests pass (e.g gulp)

More info can be found on our contribution guide.

newPosition = new Position(newPosition.line, Math.max(newPosition.getLineEnd().character - 1, 0));
if (this._vimState.currentMode === ModeName.Insert) {
// This lets you use arrow keys to move to the end of the line
newPosition = new Position(newPosition.line, Math.max(newPosition.getLineEnd().character, 0));
Copy link
Member

@johnfn johnfn Oct 5, 2016

Choose a reason for hiding this comment

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

Is this necessary? The position will already be bounded between 0 and the length of the line anyways.

Copy link
Member Author

Choose a reason for hiding this comment

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

Where will it be bounded?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah I see, let me try an adjustment

@johnfn johnfn merged commit 0abee16 into VSCodeVim:master Oct 5, 2016
@johnfn
Copy link
Member

johnfn commented Oct 5, 2016

Great, thanks @xconverge!

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