aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-05-19 23:49:08 +0100
committerAleksey Kladov <[email protected]>2020-05-19 23:49:44 +0100
commit39ec581bf6e01cf2d7f33aacbe8879abf7ea3199 (patch)
tree6fee45df714befbc0633299b56c6027ab1bcfed8
parente94d7c124ffae5c7409b560e29a6cee006edf401 (diff)
Fix client-side snippets
-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 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 {
65 let lineDelta = 0; 65 let lineDelta = 0;
66 await editor.edit((builder) => { 66 await editor.edit((builder) => {
67 for (const indel of edits) { 67 for (const indel of edits) {
68 if (indel.newText.indexOf('$0') !== -1) { 68 const isSnippet = indel.newText.indexOf('$0') !== -1 || indel.newText.indexOf('${') !== -1;
69 if (isSnippet) {
69 editWithSnippet = indel; 70 editWithSnippet = indel;
70 } else { 71 } else {
71 if (!editWithSnippet) { 72 if (!editWithSnippet) {