aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-05-19 23:50:26 +0100
committerGitHub <[email protected]>2020-05-19 23:50:26 +0100
commit28f6b5b8493024b87f53ea9be4d517442588b7e5 (patch)
tree6fee45df714befbc0633299b56c6027ab1bcfed8 /editors/code/src
parente94d7c124ffae5c7409b560e29a6cee006edf401 (diff)
parent39ec581bf6e01cf2d7f33aacbe8879abf7ea3199 (diff)
Merge #4519
4519: Fix client-side snippets r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
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 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) {