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 #739 #767

Merged
merged 3 commits into from
Sep 27, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/actions/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,13 @@ export class ChangeOperator extends BaseOperator {
const isEndOfLine = end.character === TextEditor.getLineAt(end).text.length - 1;
let state = vimState;

// If only EOL on line do nothing except change to insert
if (TextEditor.getLineAt(start).text.length < 1) {
vimState.cursorPosition = vimState.cursorStartPosition;
vimState.currentMode = ModeName.Insert;
return vimState;
}

// If we delete to EOL, the block cursor would end on the final character,
// which means the insert cursor would be one to the left of the end of
// the line.
Expand Down