提交 b431336f 编写于 作者: R Ramya Achutha Rao

Fixes #27690 Reveal range for edit point and select item

上级 89fa243f
......@@ -15,9 +15,10 @@ export function fetchEditPoint(direction: string): void {
let newSelections: vscode.Selection[] = [];
editor.selections.forEach(selection => {
let updatedSelection = direction === 'next' ? nextEditPoint(selection.anchor, editor) : prevEditPoint(selection.anchor, editor);
newSelections.push(updatedSelection);
newSelections.push(updatedSelection ? updatedSelection : selection);
});
editor.selections = newSelections;
editor.revealRange(editor.selections[editor.selections.length - 1]);
}
function nextEditPoint(position: vscode.Position, editor: vscode.TextEditor): vscode.Selection {
......
......@@ -38,4 +38,5 @@ export function fetchSelectItem(direction: string): void {
newSelections.push(updatedSelection ? updatedSelection : selection);
});
editor.selections = newSelections;
editor.revealRange(editor.selections[editor.selections.length - 1]);
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册