Skip to content

Commit

Permalink
v$ should not include the EOL character
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Fields committed Sep 1, 2019
1 parent f016da9 commit 92c3359
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/actions/motion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,10 @@ class MoveLineEnd extends BaseMovement {
vimState: VimState,
count: number
): Promise<Position | IMovement> {
return position.getDownByCount(Math.max(count - 1, 0)).getLineEnd();
const pos = position.getDownByCount(Math.max(count - 1, 0)).getLineEnd();
return vimState.currentMode === ModeName.Visual || vimState.currentMode === ModeName.VisualBlock
? pos.getLeftIfEOL()
: pos;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/state/vimState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export class VimState implements vscode.Disposable {
*/
private _currentMode: ModeName = ModeName.Normal;

public get currentMode(): number {
public get currentMode(): ModeName {
return this._currentMode;
}

Expand Down

0 comments on commit 92c3359

Please sign in to comment.