Remove need for acquiring dimensions for terminal from main thread

This commit is contained in:
Gabriel DeBacker
2019-03-06 11:47:57 -08:00
parent 99cf5e4881
commit d5e4009ae9
5 changed files with 40 additions and 26 deletions

View File

@@ -234,20 +234,10 @@ export class ExtHostTerminalRenderer extends BaseExtHostTerminal implements vsco
proxy: MainThreadTerminalServiceShape,
private _name: string,
private _terminal: ExtHostTerminal,
id?: number,
cols?: number,
rows?: number
id?: number
) {
super(proxy, id);
// TODO: Should we set maximum dimensions to these as well?
if (cols !== null && rows !== null) {
this._dimensions = {
columns: cols,
rows: rows
};
}
if (!id) {
this._proxy.$createTerminalRenderer(this._name).then(id => {
this._runQueuedRequests(id);
@@ -335,9 +325,8 @@ export class ExtHostTerminalService implements ExtHostTerminalServiceShape {
}
}
const dimensions = await this._proxy.$terminalGetDimensions(id);
const terminal = this._getTerminalById(id);
const renderer = new ExtHostTerminalRenderer(this._proxy, terminal.name, terminal, terminal._id, dimensions.cols, dimensions.rows);
const renderer = new ExtHostTerminalRenderer(this._proxy, terminal.name, terminal, terminal._id);
this._terminalRenderers.push(renderer);
return renderer;