Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes terminal Env Variables Icon Not Updating Position #98015

Merged
merged 2 commits into from Jun 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -103,6 +103,8 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
private _commandTrackerAddon: CommandTrackerAddon | undefined;
private _navigationModeAddon: INavigationMode & ITerminalAddon | undefined;

private _timeoutDimension: dom.Dimension | undefined;

public disableLayout: boolean;
public get id(): number { return this._id; }
public get cols(): number {
Expand Down Expand Up @@ -821,7 +823,8 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
// HACK: Trigger another async layout to ensure xterm's CharMeasure is ready to use,
// this hack can be removed when https://github.com/xtermjs/xterm.js/issues/702 is
// supported.
setTimeout(() => this.layout(new dom.Dimension(width, height)), 0);
this._timeoutDimension = new dom.Dimension(width, height);
setTimeout(() => this.layout(this._timeoutDimension!), 0);
}
}
}
Expand Down Expand Up @@ -1269,6 +1272,8 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
return;
}

this._timeoutDimension = new dom.Dimension(dimension.width, dimension.height);

if (this._xterm && this._xterm.element) {
this._xterm.element.style.width = terminalWidth + 'px';
}
Expand Down