Set isRefactoring for all TS refactoring edits (#183982)

This commit is contained in:
Matt Bierner 2023-05-31 10:14:35 -07:00 committed by GitHub
parent c38a9e9ba5
commit 2add9d4c10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -109,7 +109,7 @@ class SelectRefactorCommand implements Command {
await tsAction.resolve(nulToken);
if (tsAction.edit) {
if (!(await vscode.workspace.applyEdit(tsAction.edit))) {
if (!(await vscode.workspace.applyEdit(tsAction.edit, { isRefactoring: true }))) {
vscode.window.showErrorMessage(vscode.l10n.t("Could not apply refactoring"));
return;
}
@ -161,7 +161,7 @@ class MoveToFileRefactorCommand implements Command {
return;
}
const edit = toWorkspaceEdit(this.client, response.body.edits);
if (!(await vscode.workspace.applyEdit(edit))) {
if (!(await vscode.workspace.applyEdit(edit, { isRefactoring: true }))) {
vscode.window.showErrorMessage(vscode.l10n.t("Could not apply refactoring"));
return;
}