Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanp413 committed Oct 24, 2022
1 parent d1f3852 commit 3da3967
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,7 @@ export class TerminalGroupService extends Disposable implements ITerminalGroupSe
}
// 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
14 changes: 4 additions & 10 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 @@ -81,11 +80,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 Expand Up @@ -164,11 +158,11 @@ export class TerminalViewPane extends ViewPane {
this._register(this.onDidChangeBodyVisibility(async visible => {
this._viewShowing.set(visible);
if (visible) {
const hadTerminals = !!this._terminalGroupService.groups.length;
// Ensure the primary backend is registered as it's important to do before
// initializeTerminals is called.
await this._terminalService.primaryBackendRegistered;
if (this._terminalService.isProcessSupportRegistered) {
const hadTerminals = !!this._terminalGroupService.groups.length;
// Ensure the primary backend is registered as it's important to do before
// initializeTerminals is called.
await this._terminalService.primaryBackendRegistered;
if (this._terminalsInitialized) {
if (!hadTerminals) {
this._terminalService.createTerminal({ location: TerminalLocation.Panel });
Expand Down

0 comments on commit 3da3967

Please sign in to comment.