Fixes #2052. Readline get win cols correctly
This commit is contained in:
parent
efb833f342
commit
2d13cdfd2a
@ -96,12 +96,12 @@ function Interface(input, output, completer) {
|
|||||||
this.historyIndex = -1;
|
this.historyIndex = -1;
|
||||||
|
|
||||||
var winSize = output.getWindowSize();
|
var winSize = output.getWindowSize();
|
||||||
exports.columns = winSize[1];
|
exports.columns = winSize[0];
|
||||||
|
|
||||||
if (process.listeners('SIGWINCH').length === 0) {
|
if (process.listeners('SIGWINCH').length === 0) {
|
||||||
process.on('SIGWINCH', function() {
|
process.on('SIGWINCH', function() {
|
||||||
var winSize = output.getWindowSize();
|
var winSize = output.getWindowSize();
|
||||||
exports.columns = winSize[1];
|
exports.columns = winSize[0];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user