We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a45ac0 commit ef63af6Copy full SHA for ef63af6
lib/tty.js
@@ -66,7 +66,7 @@ function WriteStream(fd) {
66
// Ref: https://github.com/nodejs/node/pull/1771#issuecomment-119351671
67
if (process.platform === 'darwin') this._handle.setBlocking(true);
68
69
- var winSize = [];
+ var winSize = new Array(2);
70
var err = this._handle.getWindowSize(winSize);
71
if (!err) {
72
this.columns = winSize[0];
@@ -83,7 +83,7 @@ WriteStream.prototype.isTTY = true;
83
WriteStream.prototype._refreshSize = function() {
84
var oldCols = this.columns;
85
var oldRows = this.rows;
86
87
88
if (err) {
89
this.emit('error', errnoException(err, 'getWindowSize'));
0 commit comments