mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
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:
commit
3de03d4c61
1 changed files with 3 additions and 2 deletions
|
@ -125,8 +125,9 @@ export function joinLines(ctx: Ctx): Cmd {
|
|||
editor.document
|
||||
),
|
||||
});
|
||||
await editor.edit(async (builder) => {
|
||||
(await client.protocol2CodeConverter.asTextEdits(items)).forEach((edit: any) => {
|
||||
const textEdits = await client.protocol2CodeConverter.asTextEdits(items);
|
||||
await editor.edit((builder) => {
|
||||
textEdits.forEach((edit: any) => {
|
||||
builder.replace(edit.range, edit.newText);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue