提交 1b3783b6 编写于 作者: J Johannes Rieken

fix #17407

上级 d6202a6b
......@@ -340,9 +340,9 @@ export class InsertSnippetController {
}
private doLinkEditing(): void {
var selections: editorCommon.ISelection[] = [];
for (var i = 0, len = this.trackedPlaceHolders[this.currentPlaceHolderIndex].ranges.length; i < len; i++) {
var range = this.model.getDecorationRange(this.trackedPlaceHolders[this.currentPlaceHolderIndex].ranges[i]);
const selections: editorCommon.ISelection[] = [];
for (let i = 0, len = this.trackedPlaceHolders[this.currentPlaceHolderIndex].ranges.length; i < len; i++) {
const range = this.model.getDecorationRange(this.trackedPlaceHolders[this.currentPlaceHolderIndex].ranges[i]);
selections.push({
selectionStartLineNumber: range.startLineNumber,
selectionStartColumn: range.startColumn,
......@@ -351,6 +351,7 @@ export class InsertSnippetController {
});
}
this.editor.setSelections(selections);
this.editor.revealRangeInCenterIfOutsideViewport(this.editor.getSelection());
}
private stopAll(): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册