Auto merge of #12342 - lnicola:fix-join-lines, r=lnicola

fix: Fix broken async callback in join lines

Fixes #12338.
This commit is contained in:
bors 2022-05-21 15:39:16 +00:00
commit 3de03d4c61

View file

@ -125,8 +125,9 @@ export function joinLines(ctx: Ctx): Cmd {
editor.document editor.document
), ),
}); });
await editor.edit(async (builder) => { const textEdits = await client.protocol2CodeConverter.asTextEdits(items);
(await client.protocol2CodeConverter.asTextEdits(items)).forEach((edit: any) => { await editor.edit((builder) => {
textEdits.forEach((edit: any) => {
builder.replace(edit.range, edit.newText); builder.replace(edit.range, edit.newText);
}); });
}); });