Skip to content

Commit 3de03d4

Browse files
committed
Auto merge of rust-lang#12342 - lnicola:fix-join-lines, r=lnicola
fix: Fix broken async callback in join lines Fixes rust-lang#12338.
2 parents 01d412f + 1e617f4 commit 3de03d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

editors/code/src/commands.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ export function joinLines(ctx: Ctx): Cmd {
125125
editor.document
126126
),
127127
});
128-
await editor.edit(async (builder) => {
129-
(await client.protocol2CodeConverter.asTextEdits(items)).forEach((edit: any) => {
128+
const textEdits = await client.protocol2CodeConverter.asTextEdits(items);
129+
await editor.edit((builder) => {
130+
textEdits.forEach((edit: any) => {
130131
builder.replace(edit.range, edit.newText);
131132
});
132133
});

0 commit comments

Comments
 (0)