Skip to content

Commit

Permalink
Revert "fix #133960"
Browse files Browse the repository at this point in the history
This reverts commit d1f8da2.
  • Loading branch information
meganrogge committed Sep 29, 2021
1 parent 024e054 commit 12a0239
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
12 changes: 3 additions & 9 deletions src/vs/workbench/contrib/terminal/browser/terminalActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { ICodeEditorService } from 'vs/editor/browser/services/codeEditorService
import { EndOfLinePreference } from 'vs/editor/common/model';
import { localize } from 'vs/nls';
import { CONTEXT_ACCESSIBILITY_MODE_ENABLED } from 'vs/platform/accessibility/common/accessibility';
import { Action2, ICommandActionTitle, ILocalizedString, MenuId, registerAction2 } from 'vs/platform/actions/common/actions';
import { Action2, ICommandActionTitle, ILocalizedString, registerAction2 } from 'vs/platform/actions/common/actions';
import { ICommandService } from 'vs/platform/commands/common/commands';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
Expand Down Expand Up @@ -1872,16 +1872,10 @@ export function registerTerminalActions() {
constructor() {
super({
id: TerminalCommandId.SizeToContentWidthInstance,
title: terminalStrings.sizeToContentWidth,
title: terminalStrings.toggleSizeToContentWidth,
f1: false,
category,
toggled: TerminalContextKeys.terminalHasFixedWidth,
precondition: ContextKeyExpr.and(TerminalContextKeys.processSupported, TerminalContextKeys.isOpen),
menu: [{
id: MenuId.TerminalTabContext
}, {
id: MenuId.TerminalInlineTabContext
}]
precondition: ContextKeyExpr.and(TerminalContextKeys.processSupported, TerminalContextKeys.focus)
});
}
async run(accessor: ServicesAccessor) {
Expand Down
22 changes: 21 additions & 1 deletion src/vs/workbench/contrib/terminal/browser/terminalMenus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,16 @@ export function setupTerminalMenus(): void {
group: ContextMenuGroup.Edit
}
},
{
id: MenuId.TerminalInlineTabContext,
item: {
command: {
id: TerminalCommandId.SizeToContentWidthInstance,
title: localize('workbench.action.terminal.sizeToContentWidthInstance', "Toggle Size to Content Width")
},
group: ContextMenuGroup.Edit
}
},
{
id: MenuId.TerminalInlineTabContext,
item: {
Expand Down Expand Up @@ -568,6 +578,16 @@ export function setupTerminalMenus(): void {
group: ContextMenuGroup.Edit
}
},
{
id: MenuId.TerminalTabContext,
item: {
command: {
id: TerminalCommandId.SizeToContentWidthInstance,
title: localize('workbench.action.terminal.sizeToContentWidthInstance', "Toggle Size to Content Width")
},
group: ContextMenuGroup.Edit
}
},
{
id: MenuId.TerminalTabContext,
item: {
Expand Down Expand Up @@ -641,7 +661,7 @@ export function setupTerminalMenus(): void {
MenuRegistry.appendMenuItem(MenuId.EditorTitleContext, {
command: {
id: TerminalCommandId.SizeToContentWidth,
title: terminalStrings.sizeToContentWidth
title: terminalStrings.toggleSizeToContentWidth
},
when: ResourceContextKey.Scheme.isEqualTo(Schemas.vscodeTerminal),
group: '3_files'
Expand Down
6 changes: 3 additions & 3 deletions src/vs/workbench/contrib/terminal/common/terminalStrings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ export const terminalStrings = {
value: localize('workbench.action.terminal.rename', "Rename..."),
original: 'Rename...'
},
sizeToContentWidth: {
value: localize('workbench.action.terminal.sizeToContentWidthInstance', "Fixed Content Width"),
original: 'Fixed Content Width'
toggleSizeToContentWidth: {
value: localize('workbench.action.terminal.sizeToContentWidthInstance', "Toggle Size to Content Width"),
original: 'Toggle Size to Content Width'
}
};

0 comments on commit 12a0239

Please sign in to comment.