mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
Adjust selection in visual mode. Fixes #8
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user