Fixes Terminal: Focus Terminal Tabs view command not working (#164408)

This commit is contained in:
Jean Pierre 2022-11-03 13:26:19 -05:00 committed by GitHub
parent e8eb39bac2
commit 708cd91201
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 14 deletions

View file

@ -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();

View file

@ -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();
}));