about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorAleksey Kladov <aleksey.kladov@gmail.com>2020-05-20 00:49:08 +0200
committerAleksey Kladov <aleksey.kladov@gmail.com>2020-05-20 00:49:44 +0200
commit39ec581bf6e01cf2d7f33aacbe8879abf7ea3199 (patch)
tree6fee45df714befbc0633299b56c6027ab1bcfed8 /editors/code/src
parente94d7c124ffae5c7409b560e29a6cee006edf401 (diff)
downloadrust-39ec581bf6e01cf2d7f33aacbe8879abf7ea3199.tar.gz
rust-39ec581bf6e01cf2d7f33aacbe8879abf7ea3199.zip
Fix client-side snippets
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/commands/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/editors/code/src/commands/index.ts b/editors/code/src/commands/index.ts
index 770d11bd36f..0937b495c26 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) {