Skip to content

Commit

Permalink
Adjust selection in visual mode. Fixes microsoft#8
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Jul 27, 2016
1 parent 9539648 commit 05c250a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vim-sample/src/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ export class Controller implements IController {
}
let maxCharacter = lineContent.length - 1;
if (pos.character > maxCharacter) {
setPositionAndReveal(editor, pos.line, maxCharacter);
if (this._isVisual) {
setSelectionAndReveal(editor, sel.anchor, pos.line, maxCharacter);
} else {
setPositionAndReveal(editor, pos.line, maxCharacter);
}
}
}

Expand Down

0 comments on commit 05c250a

Please sign in to comment.