Skip to content

Commit 708cd91

Browse files
authored
Fixes Terminal: Focus Terminal Tabs view command not working (microsoft#164408)
1 parent e8eb39b commit 708cd91

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,7 @@ export class TerminalGroupService extends Disposable implements ITerminalGroupSe
179179
if (pane && !pane.isVisible()) {
180180
await this._viewsService.openView(TERMINAL_VIEW_ID, focus);
181181
}
182-
// Do not await the focus as setVisible must be called immediately to ensure
183-
// something else didn't steal focus
184-
instance.focusWhenReady(true);
185-
// HACK: as a workaround for https://github.com/microsoft/vscode/issues/134692,
186-
// this will trigger a forced refresh of the viewport to sync the viewport and scroll bar.
187-
// This can likely be removed after https://github.com/xtermjs/xterm.js/issues/291 is
188-
// fixed upstream.
189-
instance.setVisible(true);
182+
await instance.focusWhenReady(true);
190183
}
191184
}
192185
this._onDidShow.fire();

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ import { ServicesAccessor } from 'vs/editor/browser/editorExtensions';
4747
import { TerminalCapability } from 'vs/platform/terminal/common/capabilities/capabilities';
4848

4949
export class TerminalViewPane extends ViewPane {
50-
private _actions: IAction[] | undefined;
5150
private _fontStyleElement: HTMLElement | undefined;
5251
private _parentDomElement: HTMLElement | undefined;
5352
private _terminalTabbedView?: TerminalTabbedView;
@@ -80,11 +79,6 @@ export class TerminalViewPane extends ViewPane {
8079
) {
8180
super(options, keybindingService, _contextMenuService, _configurationService, _contextKeyService, viewDescriptorService, _instantiationService, openerService, themeService, telemetryService);
8281
this._register(this._terminalService.onDidRegisterProcessSupport(() => {
83-
if (this._actions) {
84-
for (const action of this._actions) {
85-
action.enabled = true;
86-
}
87-
}
8882
this._onDidChangeViewWelcomeState.fire();
8983
}));
9084

0 commit comments

Comments
 (0)