Skip to content

Commit 3cd5166

Browse files
authored
don't disable the close button for peek (microsoft#165826)
microsoft#165646
1 parent 57f489b commit 3cd5166

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,13 +284,11 @@ registerAction2(class extends EditorAction2 {
284284
id: 'editor.closeCallHierarchy',
285285
title: localize('close', 'Close'),
286286
icon: Codicon.close,
287-
precondition: ContextKeyExpr.and(
288-
_ctxCallHierarchyVisible,
289-
ContextKeyExpr.not('config.editor.stablePeek')
290-
),
287+
precondition: _ctxCallHierarchyVisible,
291288
keybinding: {
292289
weight: KeybindingWeight.WorkbenchContrib + 10,
293-
primary: KeyCode.Escape
290+
primary: KeyCode.Escape,
291+
when: ContextKeyExpr.not('config.editor.stablePeek')
294292
},
295293
menu: {
296294
id: CallHierarchyTreePeekWidget.TitleMenu,

src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,13 +1071,11 @@ export class CloseTestPeek extends EditorAction2 {
10711071
id: 'editor.closeTestPeek',
10721072
title: localize('close', 'Close'),
10731073
icon: Codicon.close,
1074-
precondition: ContextKeyExpr.and(
1075-
ContextKeyExpr.or(TestingContextKeys.isInPeek, TestingContextKeys.isPeekVisible),
1076-
ContextKeyExpr.not('config.editor.stablePeek')
1077-
),
1074+
precondition: ContextKeyExpr.or(TestingContextKeys.isInPeek, TestingContextKeys.isPeekVisible),
10781075
keybinding: {
10791076
weight: KeybindingWeight.EditorContrib - 101,
1080-
primary: KeyCode.Escape
1077+
primary: KeyCode.Escape,
1078+
when: ContextKeyExpr.not('config.editor.stablePeek')
10811079
}
10821080
});
10831081
}

src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,11 @@ registerAction2(class extends EditorAction2 {
276276
id: 'editor.closeTypeHierarchy',
277277
title: localize('close', 'Close'),
278278
icon: Codicon.close,
279-
precondition: ContextKeyExpr.and(
280-
_ctxTypeHierarchyVisible,
281-
ContextKeyExpr.not('config.editor.stablePeek')
282-
),
279+
precondition: _ctxTypeHierarchyVisible,
283280
keybinding: {
284281
weight: KeybindingWeight.WorkbenchContrib + 10,
285-
primary: KeyCode.Escape
282+
primary: KeyCode.Escape,
283+
when: ContextKeyExpr.not('config.editor.stablePeek')
286284
},
287285
menu: {
288286
id: TypeHierarchyTreePeekWidget.TitleMenu,

0 commit comments

Comments
 (0)