Skip to content

Commit b604b50

Browse files
committed
Polish menu items, add keybindings
1 parent 7e09a61 commit b604b50

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ export function getTerminalActionBarArgs(location: ITerminalLocationOptions, pro
690690
const submenuActions: IAction[] = [];
691691
const splitLocation = (location === TerminalLocation.Editor || (typeof location === 'object' && 'viewColumn' in location && location.viewColumn === ACTIVE_GROUP)) ? { viewColumn: SIDE_GROUP } : { splitActiveTerminal: true };
692692

693-
dropdownActions.push(disposableStore.add(new Action(TerminalCommandId.New, terminalStrings.newInView, undefined, true, () => terminalService.createAndFocusTerminal())));
693+
dropdownActions.push(disposableStore.add(new Action(TerminalCommandId.New, terminalStrings.new, undefined, true, () => terminalService.createAndFocusTerminal())));
694694
dropdownActions.push(disposableStore.add(new Action(TerminalCommandId.NewInNewWindow, terminalStrings.newInNewWindow.short, undefined, true, () => terminalService.createAndFocusTerminal({
695695
location: { viewColumn: AUX_WINDOW_GROUP }
696696
}))));

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,10 @@ export class TerminalViewPane extends ViewPane {
293293
case TerminalCommandId.New: {
294294
if (action instanceof MenuItemAction) {
295295
const actions = getTerminalActionBarArgs(TerminalLocation.Panel, this._terminalProfileService.availableProfiles, this._getDefaultProfileName(), this._terminalProfileService.contributedProfiles, this._terminalService, this._dropdownMenu, this._disposableStore);
296-
this._newDropdown.value = new DropdownWithPrimaryActionViewItem(action, actions.dropdownAction, actions.dropdownMenuActions, actions.className, { hoverDelegate: options.hoverDelegate }, this._contextMenuService, this._keybindingService, this._notificationService, this._contextKeyService, this._themeService, this._accessibilityService);
296+
this._newDropdown.value = this._instantiationService.createInstance(DropdownWithPrimaryActionViewItem, action, actions.dropdownAction, actions.dropdownMenuActions, actions.className, {
297+
hoverDelegate: options.hoverDelegate,
298+
getKeyBinding: (action: IAction) => this._keybindingService.lookupKeybinding(action.id, this._contextKeyService)
299+
});
297300
this._newDropdown.value?.update(actions.dropdownAction, actions.dropdownMenuActions);
298301
return this._newDropdown.value;
299302
}

src/vs/workbench/contrib/terminal/common/terminalStrings.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { localize, localize2 } from '../../../../nls.js';
1111
export const terminalStrings = {
1212
terminal: localize('terminal', "Terminal"),
1313
new: localize('terminal.new', "New Terminal"),
14-
newInView: localize('terminal.newInView', "New in Terminal View"),
1514
doNotShowAgain: localize('doNotShowAgain', 'Do Not Show Again'),
1615
currentSessionCategory: localize('currentSessionCategory', 'current session'),
1716
previousSessionCategory: localize('previousSessionCategory', 'previous session'),

0 commit comments

Comments
 (0)