diff --git a/editors/code/src/snippets.ts b/editors/code/src/snippets.ts index 58f7aa128ff..a409e52963c 100644 --- a/editors/code/src/snippets.ts +++ b/editors/code/src/snippets.ts @@ -52,7 +52,7 @@ export async function applySnippetTextEdits(editor: vscode.TextEditor, edits: vs } else { builder.replace(indel.range, indel.newText); } - lineDelta = countLines(indel.newText) - (indel.range.end.line - indel.range.start.line); + lineDelta += countLines(indel.newText) - (indel.range.end.line - indel.range.start.line); } }); if (selections.length > 0) editor.selections = selections;