From 708cd91201b87ed04a2c69ad07f914f44cda0d71 Mon Sep 17 00:00:00 2001 From: Jean Pierre Date: Thu, 3 Nov 2022 13:26:19 -0500 Subject: [PATCH] Fixes `Terminal: Focus Terminal Tabs view` command not working (#164408) --- .../contrib/terminal/browser/terminalGroupService.ts | 9 +-------- .../workbench/contrib/terminal/browser/terminalView.ts | 6 ------ 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/vs/workbench/contrib/terminal/browser/terminalGroupService.ts b/src/vs/workbench/contrib/terminal/browser/terminalGroupService.ts index 9835ac1fbcac4..6c1dd3e609d32 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalGroupService.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalGroupService.ts @@ -179,14 +179,7 @@ export class TerminalGroupService extends Disposable implements ITerminalGroupSe if (pane && !pane.isVisible()) { await this._viewsService.openView(TERMINAL_VIEW_ID, focus); } - // Do not await the focus as setVisible must be called immediately to ensure - // something else didn't steal focus - instance.focusWhenReady(true); - // HACK: as a workaround for https://github.com/microsoft/vscode/issues/134692, - // this will trigger a forced refresh of the viewport to sync the viewport and scroll bar. - // This can likely be removed after https://github.com/xtermjs/xterm.js/issues/291 is - // fixed upstream. - instance.setVisible(true); + await instance.focusWhenReady(true); } } this._onDidShow.fire(); diff --git a/src/vs/workbench/contrib/terminal/browser/terminalView.ts b/src/vs/workbench/contrib/terminal/browser/terminalView.ts index 672b8c00cc89d..c4ca73abbbbee 100644 --- a/src/vs/workbench/contrib/terminal/browser/terminalView.ts +++ b/src/vs/workbench/contrib/terminal/browser/terminalView.ts @@ -47,7 +47,6 @@ import { ServicesAccessor } from 'vs/editor/browser/editorExtensions'; import { TerminalCapability } from 'vs/platform/terminal/common/capabilities/capabilities'; export class TerminalViewPane extends ViewPane { - private _actions: IAction[] | undefined; private _fontStyleElement: HTMLElement | undefined; private _parentDomElement: HTMLElement | undefined; private _terminalTabbedView?: TerminalTabbedView; @@ -80,11 +79,6 @@ export class TerminalViewPane extends ViewPane { ) { super(options, keybindingService, _contextMenuService, _configurationService, _contextKeyService, viewDescriptorService, _instantiationService, openerService, themeService, telemetryService); this._register(this._terminalService.onDidRegisterProcessSupport(() => { - if (this._actions) { - for (const action of this._actions) { - action.enabled = true; - } - } this._onDidChangeViewWelcomeState.fire(); }));