diff options
author | Aleksey Kladov <[email protected]> | 2020-05-25 13:12:53 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-25 13:28:47 +0100 |
commit | 76e170c3d0d0784c0e612c5849798c65a2034f29 (patch) | |
tree | 8cf69f49502a9f2b08d2d2975be79f54f9a04ccb /editors/code/src/snippets.ts | |
parent | e4f91bfa578e57c1ef4be3343ebb4e8950e5dae6 (diff) |
Less rust-analyzer specific onEnter
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) => { |