Fix client-side snippets

This commit is contained in:
Aleksey Kladov 2020-05-20 00:49:08 +02:00
parent e94d7c124f
commit 39ec581bf6

View File

@ -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) {