Adjust selection in visual mode. Fixes #8

This commit is contained in:
Sandeep Somavarapu
2016-07-27 12:51:05 +02:00
parent 9539648af7
commit 05c250a403

View File

@ -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);
}
}
}