Skip to content

Commit 735d80e

Browse files
authored
revert early disposal of code actions (microsoft#205508)
revert early disposal of actinos
1 parent 1a0dcf8 commit 735d80e

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/vs/editor/contrib/codeAction/browser/codeActionController.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,7 @@ export class CodeActionController extends Disposable implements IEditorContribut
112112
command.arguments[0] = { ...command.arguments[0], autoSend: false };
113113
}
114114
}
115-
try {
116-
this._lightBulbWidget.value?.hide();
117-
await this._applyCodeAction(actionItem, false, false, ApplyCodeActionReason.FromAILightbulb);
118-
} finally {
119-
actions.dispose();
120-
}
115+
await this._applyCodeAction(actionItem, false, false, ApplyCodeActionReason.FromAILightbulb);
121116
return;
122117
}
123118
await this.showCodeActionList(actions, at, { includeDisabledActions: false, fromLightbulb: true });
@@ -284,11 +279,7 @@ export class CodeActionController extends Disposable implements IEditorContribut
284279

285280
const delegate: IActionListDelegate<CodeActionItem> = {
286281
onSelect: async (action: CodeActionItem, preview?: boolean) => {
287-
try {
288-
await this._applyCodeAction(action, /* retrigger */ true, !!preview, ApplyCodeActionReason.FromCodeActions);
289-
} finally {
290-
actions.dispose();
291-
}
282+
this._applyCodeAction(action, /* retrigger */ true, !!preview, ApplyCodeActionReason.FromCodeActions);
292283
this._actionWidgetService.hide();
293284
currentDecorations.clear();
294285
},

0 commit comments

Comments
 (0)