aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-16 21:21:02 -0500
committerRob Landley <rob@landley.net>2015-04-16 21:21:02 -0500
commit17499c3731273d2cffdd96d011cf8ed6aca103da (patch)
tree69b5c3d38db55d094036a98002fcb7fbc097cf75 /lib
parentd332c0461f71a04f0ece907166b7c98f1e7e50f8 (diff)
downloadtoybox-17499c3731273d2cffdd96d011cf8ed6aca103da.tar.gz
terminal_size should use LINES, not ROWS.
The shell's pseudo-variable is called LINES. This is true of at least bash and mksh.
Diffstat (limited to 'lib')
-rw-r--r--lib/lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lib.c b/lib/lib.c
index 9664bec5..99d2ea60 100644
--- a/lib/lib.c
+++ b/lib/lib.c
@@ -627,7 +627,7 @@ int terminal_size(unsigned *xx, unsigned *yy)
}
s = getenv("COLUMNS");
if (s) sscanf(s, "%u", &x);
- s = getenv("ROWS");
+ s = getenv("LINES");
if (s) sscanf(s, "%u", &y);
// Never return 0 for either value, leave it at default instead.