diff options
Diffstat (limited to 'editors/code/src/snippets.ts')
-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 794530162..bcb3f2cc7 100644 --- a/editors/code/src/snippets.ts +++ b/editors/code/src/snippets.ts | |||
@@ -8,7 +8,10 @@ export async function applySnippetWorkspaceEdit(edit: vscode.WorkspaceEdit) { | |||
8 | 8 | ||
9 | const editor = vscode.window.visibleTextEditors.find((it) => it.document.uri.toString() === uri.toString()); | 9 | const editor = vscode.window.visibleTextEditors.find((it) => it.document.uri.toString() === uri.toString()); |
10 | if (!editor) return; | 10 | if (!editor) return; |
11 | await applySnippetTextEdits(editor, edits); | ||
12 | } | ||
11 | 13 | ||
14 | export async function applySnippetTextEdits(editor: vscode.TextEditor, edits: vscode.TextEdit[]) { | ||
12 | let selection: vscode.Selection | undefined = undefined; | 15 | let selection: vscode.Selection | undefined = undefined; |
13 | let lineDelta = 0; | 16 | let lineDelta = 0; |
14 | await editor.edit((builder) => { | 17 | await editor.edit((builder) => { |