projects
/
platform
/
upstream
/
toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d332c04
)
terminal_size should use LINES, not ROWS.
author
Elliott Hughes
<enh@google.com>
Fri, 17 Apr 2015 02:21:02 +0000
(21:21 -0500)
committer
Rob Landley
<rob@landley.net>
Fri, 17 Apr 2015 02:21:02 +0000
(21:21 -0500)
The shell's pseudo-variable is called LINES. This is true of at least
bash and mksh.
lib/lib.c
patch
|
blob
|
history
diff --git
a/lib/lib.c
b/lib/lib.c
index
9664bec
..
99d2ea6
100644
(file)
--- 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("
ROW
S");
+ s = getenv("
LINE
S");
if (s) sscanf(s, "%u", &y);
// Never return 0 for either value, leave it at default instead.