onDidOverrideDimensions

An event that when fired allows overriding the dimensions of the terminal. Note that when set, the overridden dimensions will only take effect when they are lower than the actual dimensions of the terminal (ie. there will never be a scroll bar). Set to undefined for the terminal to go back to the regular dimensions (fit to the size of the panel).

Events fired before Pseudoterminal.open is called will be be ignored.

Example: Override the dimensions of a terminal to 20 columns and 10 rows

const dimensionsEmitter = new vscode.EventEmitter<vscode.TerminalDimensions>();
const pty: vscode.Pseudoterminal = {
onDidWrite: writeEmitter.event,
onDidOverrideDimensions: dimensionsEmitter.event,
open: () => {
dimensionsEmitter.fire({
columns: 20,
rows: 10
});
},
close: () => {}
};
vscode.window.createTerminal({ name: 'My terminal', pty });

Online Documentation