diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-05-25 13:29:47 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-05-25 13:29:47 +0100 |
commit | 8686d0b0ac765c2144b22b897de1d8fda68ecc6e (patch) | |
tree | 8cf69f49502a9f2b08d2d2975be79f54f9a04ccb /editors/code/src/snippets.ts | |
parent | e4f91bfa578e57c1ef4be3343ebb4e8950e5dae6 (diff) | |
parent | 76e170c3d0d0784c0e612c5849798c65a2034f29 (diff) |
Merge #4607
4607: Less rust-analyzer specific onEnter r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
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) => { |