mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-22 11:24:24 +00:00
Fix broken async callback in join lines
This commit is contained in:
parent
01d412f4d7
commit
1e617f4fc6
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…
Add table
Add a link
Reference in a new issue