mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Fixes #2052. Readline get win cols correctly
This commit is contained in:
1 parent
efb833f342
commit
2d13cdfd2a
1 file changed
+2
-2
+2
-2
@@ -96,12 +96,12 @@ function Interface(input, output, completer) {
|
||||
this.historyIndex = -1;
|
||||
|
||||
var winSize = output.getWindowSize();
|
||||
exports.columns = winSize[1];
|
||||
exports.columns = winSize[0];
|
||||
|
||||
if (process.listeners('SIGWINCH').length === 0) {
|
||||
process.on('SIGWINCH', function() {
|
||||
var winSize = output.getWindowSize();
|
||||
exports.columns = winSize[1];
|
||||
exports.columns = winSize[0];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user