aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-05-23 21:32:24 +0100
committerAleksey Kladov <[email protected]>2021-05-23 21:40:19 +0100
commita6633a88a8b2c580aa1aa38354aa858236dfc17e (patch)
tree8481c61da5fef3aadefcf8f4994ee57a158f3b91
parent16054887102104208f4a0fc0e75e702b85a2eae8 (diff)
fix: reveal snippets
-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 {