diff options
author | Aleksey Kladov <[email protected]> | 2021-05-23 21:32:24 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-05-23 21:40:19 +0100 |
commit | a6633a88a8b2c580aa1aa38354aa858236dfc17e (patch) | |
tree | 8481c61da5fef3aadefcf8f4994ee57a158f3b91 /editors/code/src | |
parent | 16054887102104208f4a0fc0e75e702b85a2eae8 (diff) |
fix: reveal snippets
Diffstat (limited to 'editors/code/src')
-rw-r--r-- | editors/code/src/snippets.ts | 3 |
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 | ||
61 | function parseSnippet(snip: string): [string, [number, number]] | undefined { | 64 | function parseSnippet(snip: string): [string, [number, number]] | undefined { |