From c0ddd25430c92faeea92bde2d55b18b7947ffdc9 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Wed, 30 Jun 2021 10:31:28 -0700 Subject: [PATCH] Fix #127462 --- .../contrib/preferences/browser/preferences.contribution.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts b/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts index 333ce5c90c0..b4d64d4e5ea 100644 --- a/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts +++ b/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts @@ -280,7 +280,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon icon: preferencesOpenSettingsIcon, menu: [{ id: MenuId.EditorTitle, - when: ResourceContextKey.Resource.isEqualTo(that.environmentService.settingsResource.toString()), + when: ContextKeyExpr.and(ResourceContextKey.Resource.isEqualTo(that.environmentService.settingsResource.toString()), ContextKeyExpr.not('isInDiffEditor')), group: 'navigation', order: 1 }] @@ -1158,7 +1158,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon title: OPEN_SETTINGS2_ACTION_TITLE, icon: preferencesOpenSettingsIcon }, - when: ContextKeyExpr.and(ResourceContextKey.Resource.isEqualTo(this.preferencesService.workspaceSettingsResource!.toString()), WorkbenchStateContext.isEqualTo('workspace')), + when: ContextKeyExpr.and(ResourceContextKey.Resource.isEqualTo(this.preferencesService.workspaceSettingsResource!.toString()), WorkbenchStateContext.isEqualTo('workspace'), ContextKeyExpr.not('isInDiffEditor')), group: 'navigation', order: 1 }); @@ -1183,7 +1183,7 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon title: OPEN_SETTINGS2_ACTION_TITLE, icon: preferencesOpenSettingsIcon }, - when: ContextKeyExpr.and(ResourceContextKey.Resource.isEqualTo(this.preferencesService.getFolderSettingsResource(folder.uri)!.toString())), + when: ContextKeyExpr.and(ResourceContextKey.Resource.isEqualTo(this.preferencesService.getFolderSettingsResource(folder.uri)!.toString()), ContextKeyExpr.not('isInDiffEditor')), group: 'navigation', order: 1 });