fix: reveal snippets

This commit is contained in:
Aleksey Kladov 2021-05-23 23:32:24 +03:00
parent 1605488710
commit a6633a88a8

View File

@ -56,6 +56,9 @@ export async function applySnippetTextEdits(editor: vscode.TextEditor, edits: vs
}
});
if (selections.length > 0) editor.selections = selections;
if (selections.length === 1) {
editor.revealRange(selections[0], vscode.TextEditorRevealType.InCenterIfOutsideViewport);
}
}
function parseSnippet(snip: string): [string, [number, number]] | undefined {