Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Fixes #2052. Readline get win cols correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Nov 8, 2011
1 parent efb833f commit 2d13cdf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/readline.js
Expand Up @@ -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];
});
}
}
Expand Down

0 comments on commit 2d13cdf

Please sign in to comment.