Skip to content

Commit d68ae55

Browse files
meganroggeTyriar
andauthored
show fit to content width in command palette (microsoft#154325)
* fix microsoft#152748 * better solution Co-authored-by: Daniel Imms <[email protected]> * Update src/vs/workbench/contrib/terminal/browser/terminalActions.ts * add comma Co-authored-by: Daniel Imms <[email protected]>
1 parent fc6f01f commit d68ae55

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/vs/workbench/contrib/terminal/browser/terminalActions.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2127,23 +2127,25 @@ export function registerTerminalActions() {
21272127
title: { value: localize('workbench.action.terminal.sizeToContentWidth', "Toggle Size to Content Width"), original: 'Toggle Size to Content Width' },
21282128
f1: true,
21292129
category,
2130-
precondition: ContextKeyExpr.and(ContextKeyExpr.or(TerminalContextKeys.processSupported, TerminalContextKeys.terminalHasBeenCreated), TerminalContextKeys.isOpen, TerminalContextKeys.focus),
2130+
precondition: ContextKeyExpr.and(ContextKeyExpr.or(TerminalContextKeys.processSupported, TerminalContextKeys.terminalHasBeenCreated), TerminalContextKeys.isOpen),
21312131
keybinding: {
21322132
primary: KeyMod.Alt | KeyCode.KeyZ,
2133-
weight: KeybindingWeight.WorkbenchContrib
2133+
weight: KeybindingWeight.WorkbenchContrib,
2134+
when: TerminalContextKeys.focus
21342135
}
21352136
});
21362137
}
21372138
async run(accessor: ServicesAccessor) {
21382139
await accessor.get(ITerminalService).doWithActiveInstance(t => t.toggleSizeToContentWidth());
21392140
}
21402141
});
2142+
21412143
registerAction2(class extends Action2 {
21422144
constructor() {
21432145
super({
21442146
id: TerminalCommandId.SizeToContentWidthInstance,
21452147
title: terminalStrings.toggleSizeToContentWidth,
2146-
f1: true,
2148+
f1: false,
21472149
category,
21482150
precondition: ContextKeyExpr.and(ContextKeyExpr.or(TerminalContextKeys.processSupported, TerminalContextKeys.terminalHasBeenCreated), TerminalContextKeys.focus)
21492151
});

0 commit comments

Comments
 (0)