mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 21:06:57 +00:00
parent
6fded8a497
commit
9fea64a934
1 changed files with 9 additions and 5 deletions
|
@ -725,7 +725,7 @@ export class SwitchTerminalActionViewItem extends SelectActionViewItem {
|
|||
@IThemeService private readonly themeService: IThemeService,
|
||||
@IContextViewService contextViewService: IContextViewService
|
||||
) {
|
||||
super(null, action, terminalService.getTabLabels().map(label => <ISelectOptionItem>{ text: label }), terminalService.activeTabIndex, contextViewService, { ariaLabel: nls.localize('terminals', 'Open Terminals.') });
|
||||
super(null, action, getTerminalSelectOpenItems(terminalService), terminalService.activeTabIndex, contextViewService, { ariaLabel: nls.localize('terminals', 'Open Terminals.') });
|
||||
|
||||
this._register(terminalService.onInstancesChanged(this._updateItems, this));
|
||||
this._register(terminalService.onActiveTabChanged(this._updateItems, this));
|
||||
|
@ -743,13 +743,17 @@ export class SwitchTerminalActionViewItem extends SelectActionViewItem {
|
|||
}
|
||||
|
||||
private _updateItems(): void {
|
||||
const items = this.terminalService.getTabLabels().map(label => <ISelectOptionItem>{ text: label });
|
||||
items.push({ text: SwitchTerminalActionViewItem.SEPARATOR, isDisabled: true });
|
||||
items.push({ text: SelectDefaultShellWindowsTerminalAction.LABEL });
|
||||
this.setOptions(items, this.terminalService.activeTabIndex);
|
||||
this.setOptions(getTerminalSelectOpenItems(this.terminalService), this.terminalService.activeTabIndex);
|
||||
}
|
||||
}
|
||||
|
||||
function getTerminalSelectOpenItems(terminalService: ITerminalService): ISelectOptionItem[] {
|
||||
const items = terminalService.getTabLabels().map(label => <ISelectOptionItem>{ text: label });
|
||||
items.push({ text: SwitchTerminalActionViewItem.SEPARATOR, isDisabled: true });
|
||||
items.push({ text: SelectDefaultShellWindowsTerminalAction.LABEL });
|
||||
return items;
|
||||
}
|
||||
|
||||
export class ScrollDownTerminalAction extends Action {
|
||||
|
||||
public static readonly ID = TERMINAL_COMMAND_ID.SCROLL_DOWN_LINE;
|
||||
|
|
Loading…
Reference in a new issue