diff options
author | Tyler Green <tyler.green2@gmail.com> | 2012-02-22 22:54:22 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2012-02-24 01:29:00 +0400 |
commit | 5f6184580590869a5ce04c176558c34b8a5f4b21 (patch) | |
tree | 3e1fb8503f45af9918871f2774b0054e6bae08c5 | |
parent | 0949df998b757fde459fbc2056ff0d725a0dbdde (diff) |
fix #2187 set terminal columns to Infinity if 0
Updated deprecated call from tty.getWindowSize()[1]
-rw-r--r-- | lib/search.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/search.js b/lib/search.js index 92f4319f5..213390eb0 100644 --- a/lib/search.js +++ b/lib/search.js @@ -137,7 +137,8 @@ function prettify (data, args) { , stdout = process.stdout , cols = !tty.isatty(stdout.fd) ? Infinity : stdout._handle ? stdout._handle.getWindowSize()[0] - : tty.getWindowSize()[1] + : process.stdout.getWindowSize()[0] + cols = (cols == 0) ? Infinity : cols } catch (ex) { cols = Infinity } // name, desc, author, keywords |