Merge pull request #114934 from microsoft/merogge/terminalDimensions

set terminal dimensions when we start sending events
This commit is contained in:
Daniel Imms 2021-01-25 10:36:12 -08:00 committed by GitHub
commit f3136a25fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

2
src/vs/vscode.d.ts vendored
View file

@ -9273,7 +9273,7 @@ declare module 'vscode' {
* Implement to handle when the number of rows and columns that fit into the terminal panel
* changes, for example when font size changes or when the panel is resized. The initial
* state of a terminal's dimensions should be treated as `undefined` until this is triggered
* as the size of a terminal isn't know until it shows up in the user interface.
* as the size of a terminal isn't known until it shows up in the user interface.
*
* When dimensions are overridden by
* [onDidOverrideDimensions](#Pseudoterminal.onDidOverrideDimensions), `setDimensions` will

View file

@ -250,6 +250,11 @@ export class ExtHostPseudoterminal implements ITerminalChildProcess {
}
this._pty.open(initialDimensions ? initialDimensions : undefined);
if (this._pty.setDimensions && initialDimensions) {
this._pty.setDimensions(initialDimensions);
}
this._onProcessReady.fire({ pid: -1, cwd: '' });
}
}