Change:
* 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 <del> * as the size of a terminal isn't know until it shows up in the user interface. </del> <ins> * as the size of a terminal isn't known until it shows up in the user interface. </ins> * * When dimensions are overridden by * [onDidOverrideDimensions](#Pseudoterminal.onDidOverrideDimensions), `setDimensions` will

Discussion:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: --<!-- Use Help Report Issue to prefill these. --Version: 1.49.1 (user setup) Commit: Date: 2020-09-16T23:27:51.792Z Electron: 9.2.1 Chrome: 83.0.4103.122 12.14.1 V8: 8.3.110.13-electron.0 OS: Windows_NT x64 10.0. Steps to Reproduce: Have an extension create a terminal. private onTerminalOpened(initialDimensions: vscode.TerminalDimensions | undefined) : void { this.terminaldDimensions = initialDimensions DefaultPseudoConsoleDimensions; } private onSetTerminalDimensions(dimensions: vscode.TerminalDimensions): void { this.terminaldDimensions = dimensions; When the terminal is shown (either programmatically or via UI) the terminal dimensions on both callbacks come in as undefined. Due to this, we cannot set the proper dimensions on the Windows CON-PTY and that results in corrupted output. <!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like: <!-- score: 0.447 --<!-- potentialduplicatescomment --
- No, this is not a duplicate
to verify: clone create a symlink to vscode-extension-samples/extension-terminal-sample within your .vscode-oss-dev directory. open a vscode window -open folder -open the symlink pointing to vscode-extension-samples/extension-terminal-sample run npm install replace the command (lines 11-39) with the following code in within the vscode-extension-samples/extension-terminal-sample folder:back in your VS code folder, build and launch VS Code in OSS, open Dev tools to reveal the console open the command palette in OSS. if your symlink worked, you will see the in the command pallette. run this. in the console of chrome dev tools, confirm that setDimensions is logged with the dimensions immediately when the terminal is created.

The dimensions should be of the actual terminal panel, not the 20x10 from
Not sure this is fixed. I have extension code ( to the terminal sample extension): When I run this... In Stable I get And in Insiders I get So in Insiders the hook isn't called on startup, and in both the hook doesn't get passed any dimensions. I think the open hook not receiving dimensions may be intentional, not sure. But I believe ought to be called at startup? Note: I just verified this by building the extension as normal, is the whole symlink setup really required? Standard extensions should see the correct behaviour too yes?
The symlink setup was needed for running out of sources, regular ext debug should work when the fix is in insiders.
Okay that's what I suspected. Verification-found still in effect.
are you not seeing this? !
Hm, it's sporadic. About half the time I don't get the initial call. See here: !
Yes it seems to only work on terminal creation when it's: the first terminal tab a split tab
It looks like there's a regression related to the terminal reconnect work related to these lines 
! This now works for all terminals that get created.
Closing as fixed by