Skip to content

Commit

Permalink
Merge pull request #143 from johnfn/fix-b-motion
Browse files Browse the repository at this point in the history
Fix b motion.
  • Loading branch information
jpoon committed Feb 15, 2016
2 parents 15e8563 + b218e75 commit aaa74b4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/motion/position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ export class Position extends vscode.Position {
}
}

if (this.line === this.getDocumentEnd().line) {
return this.getLineEnd();
if (this.line === 0) {
return this.getLineBegin();
} else {
return new Position(this.line + 1, 0, this.positionOptions);
return new Position(this.line - 1, 0, this.positionOptions);
}
}

Expand Down

0 comments on commit aaa74b4

Please sign in to comment.