From b16578ff6526793f81652cc31a9bd70dee1c4851 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Wed, 28 Sep 2022 16:15:45 -0700 Subject: [PATCH] Make sure we always reset the code action widget context when the widget is hidden (#162278) Make sure we always reset the `ctxMenuWidgetVisible` widget context when the widget is hidden We've seen a handful of reports of keybindings not working. I'm not able to repo this, but the root cause may be that code action's context keys are not being cleared properly This fixes it to make sure we always reset the context when the widget is closed --- src/vs/editor/contrib/codeAction/browser/codeActionWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/contrib/codeAction/browser/codeActionWidget.ts b/src/vs/editor/contrib/codeAction/browser/codeActionWidget.ts index 7c3180aa563..559128914f4 100644 --- a/src/vs/editor/contrib/codeAction/browser/codeActionWidget.ts +++ b/src/vs/editor/contrib/codeAction/browser/codeActionWidget.ts @@ -419,7 +419,6 @@ export class CodeActionWidget extends Disposable { } public hide() { - this._ctxMenuWidgetVisible.reset(); this.codeActionList.clear(); this._contextViewService.hideContextView(); } @@ -530,6 +529,7 @@ export class CodeActionWidget extends Disposable { }); this.currentShowingContext = undefined; + this._ctxMenuWidgetVisible.reset(); delegate.onHide(cancelled); }