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 93416e9 commit 1ed47d3Copy full SHA for 1ed47d3
lib/tty.js
@@ -55,7 +55,7 @@ function WriteStream(fd) {
55
// Ref: https://github.com/nodejs/node/pull/1771#issuecomment-119351671
56
this._handle.setBlocking(process.env.NODE_TTY_UNSAFE_ASYNC !== '1');
57
58
- var winSize = [];
+ var winSize = new Array(2);
59
var err = this._handle.getWindowSize(winSize);
60
if (!err) {
61
this.columns = winSize[0];
@@ -72,7 +72,7 @@ WriteStream.prototype.isTTY = true;
72
WriteStream.prototype._refreshSize = function() {
73
var oldCols = this.columns;
74
var oldRows = this.rows;
75
76
77
if (err) {
78
this.emit('error', errnoException(err, 'getWindowSize'));
0 commit comments