From 39ec581bf6e01cf2d7f33aacbe8879abf7ea3199 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 May 2020 00:49:08 +0200 Subject: Fix client-side snippets --- editors/code/src/commands/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'editors/code') diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts index 770d11bd3..0937b495c 100644 --- a/editors/code/src/commands/index.ts +++ b/editors/code/src/commands/index.ts @@ -65,7 +65,8 @@ export function applySnippetWorkspaceEdit(_ctx: Ctx): Cmd { let lineDelta = 0; await editor.edit((builder) => { for (const indel of edits) { - if (indel.newText.indexOf('$0') !== -1) { + const isSnippet = indel.newText.indexOf('$0') !== -1 || indel.newText.indexOf('${') !== -1; + if (isSnippet) { editWithSnippet = indel; } else { if (!editWithSnippet) { -- cgit v1.2.3