Skip to content

Commit

Permalink
fix quickfixes for create/rename/delete file operations
Browse files Browse the repository at this point in the history
  • Loading branch information
hopehadfield committed Aug 20, 2024
1 parent ef2f5d0 commit ea02c98
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,6 @@ export async function activate(context: ExtensionContext): Promise<ExtensionAPI>
}
const codeAction = await client.protocol2CodeConverter.asCodeAction(result, token);
const docEdits = codeAction.edit !== undefined? codeAction.edit.entries() : [];
const newWorkspaceEdit = new WorkspaceEdit();
for (const docEdit of docEdits) {
const uri = docEdit[0];
if (documentUris.includes(uri.toString())) {
Expand All @@ -346,12 +345,10 @@ export async function activate(context: ExtensionContext): Promise<ExtensionAPI>
editList.push(edit);
}
}
newWorkspaceEdit.set(uri, editList);
} else {
newWorkspaceEdit.set(uri, docEdit[1]);
codeAction.edit.set(uri, null);
codeAction.edit.set(uri, editList);
}
}
codeAction.edit = newWorkspaceEdit;
return codeAction;
}
return await client.protocol2CodeConverter.asCodeAction(result, token);
Expand Down

0 comments on commit ea02c98

Please sign in to comment.