提交 fd48fa0d 编写于 作者: D Daniel Imms

Fix dimenisons test and clean up

上级 3092a102
...@@ -270,27 +270,6 @@ suite('window namespace tests', () => { ...@@ -270,27 +270,6 @@ suite('window namespace tests', () => {
window.createTerminal({ name: 'c', virtualProcess }); window.createTerminal({ name: 'c', virtualProcess });
}); });
test('should get dimensions event when shown', (done) => {
const reg1 = window.onDidOpenTerminal(term => {
reg1.dispose();
equal(terminal, term);
term.show();
});
const virtualProcess: TerminalVirtualProcess = {
onDidWrite: new EventEmitter<string>().event,
setDimensions: dimensions => {
ok(dimensions.columns > 0);
ok(dimensions.rows > 0);
const reg2 = window.onDidCloseTerminal(() => {
reg2.dispose();
done();
});
terminal.dispose();
}
};
const terminal = window.createTerminal({ name: 'foo', virtualProcess });
});
test('should fire Terminal.onData on write', (done) => { test('should fire Terminal.onData on write', (done) => {
const reg1 = window.onDidOpenTerminal(term => { const reg1 = window.onDidOpenTerminal(term => {
equal(terminal, term); equal(terminal, term);
......
...@@ -1086,7 +1086,7 @@ declare module 'vscode' { ...@@ -1086,7 +1086,7 @@ declare module 'vscode' {
* Implement to handle when the terminal is ready to start firing events. * Implement to handle when the terminal is ready to start firing events.
* *
* @param initialDimensions The dimensions of the terminal, this will be undefined if the * @param initialDimensions The dimensions of the terminal, this will be undefined if the
* terminal panel has not yet been opened. * terminal panel has not been opened before this is called.
*/ */
start?(initialDimensions: TerminalDimensions | undefined): void; start?(initialDimensions: TerminalDimensions | undefined): void;
} }
......
...@@ -280,7 +280,6 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape ...@@ -280,7 +280,6 @@ export class MainThreadTerminalService implements MainThreadTerminalServiceShape
// Note that onReisze is not being listened to here as it needs to fire when max dimensions // Note that onReisze is not being listened to here as it needs to fire when max dimensions
// change, excluding the dimension override // change, excluding the dimension override
console.log('request', request);
const initialDimensions: ITerminalDimensionsDto | undefined = request.cols && request.rows ? { const initialDimensions: ITerminalDimensionsDto | undefined = request.cols && request.rows ? {
columns: request.cols, columns: request.cols,
rows: request.rows rows: request.rows
......
...@@ -993,7 +993,6 @@ export class TerminalInstance implements ITerminalInstance { ...@@ -993,7 +993,6 @@ export class TerminalInstance implements ITerminalInstance {
// Create the process asynchronously to allow the terminal's container // Create the process asynchronously to allow the terminal's container
// to be created so dimensions are accurate // to be created so dimensions are accurate
setTimeout(() => { setTimeout(() => {
console.log('create process', this._cols, this._rows, TerminalInstance._lastKnownCanvasDimensions, TerminalInstance._lastKnownGridDimensions);
this._processManager!.createProcess(this._shellLaunchConfig, this._cols, this._rows, this._isScreenReaderOptimized()); this._processManager!.createProcess(this._shellLaunchConfig, this._cols, this._rows, this._isScreenReaderOptimized());
}, 0); }, 0);
} }
...@@ -1317,7 +1316,7 @@ export class TerminalInstance implements ITerminalInstance { ...@@ -1317,7 +1316,7 @@ export class TerminalInstance implements ITerminalInstance {
if (cols !== this._xterm.cols || rows !== this._xterm.rows) { if (cols !== this._xterm.cols || rows !== this._xterm.rows) {
this._onDimensionsChanged.fire(); this._onDimensionsChanged.fire();
} }
console.log('resize xterm', cols, rows);
this._xterm.resize(cols, rows); this._xterm.resize(cols, rows);
TerminalInstance._lastKnownGridDimensions = { cols, rows }; TerminalInstance._lastKnownGridDimensions = { cols, rows };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册