aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-23 21:40:39 +0100
committerGitHub <[email protected]>2021-05-23 21:40:39 +0100
commite0864c9c153c88a4bc3b75d0cc5501678a21183a (patch)
tree9f2780683eb264a06b920bbe22d5da841531f15e /editors
parent16054887102104208f4a0fc0e75e702b85a2eae8 (diff)
parent8d5f59e0f120ed32f92a0c99c780d28af4eab879 (diff)
Merge #8950
8950: minor: align import style with styleguide r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'editors')
-rw-r--r--editors/code/src/snippets.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/editors/code/src/snippets.ts b/editors/code/src/snippets.ts
index 9561aa345..58f7aa128 100644
--- a/editors/code/src/snippets.ts
+++ b/editors/code/src/snippets.ts
@@ -56,6 +56,9 @@ export async function applySnippetTextEdits(editor: vscode.TextEditor, edits: vs
56 } 56 }
57 }); 57 });
58 if (selections.length > 0) editor.selections = selections; 58 if (selections.length > 0) editor.selections = selections;
59 if (selections.length === 1) {
60 editor.revealRange(selections[0], vscode.TextEditorRevealType.InCenterIfOutsideViewport);
61 }
59} 62}
60 63
61function parseSnippet(snip: string): [string, [number, number]] | undefined { 64function parseSnippet(snip: string): [string, [number, number]] | undefined {