mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +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
@ -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 New Issue
Block a user