Skip to content

Commit

Permalink
Fixes Terminal: Focus Terminal Tabs view command not working (#164408)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanp413 authored Nov 3, 2022
1 parent e8eb39b commit 708cd91
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
6 changes: 0 additions & 6 deletions src/vs/workbench/contrib/terminal/browser/terminalView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}));

Expand Down

0 comments on commit 708cd91

Please sign in to comment.