From 17499c3731273d2cffdd96d011cf8ed6aca103da Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 16 Apr 2015 21:21:02 -0500 Subject: terminal_size should use LINES, not ROWS. The shell's pseudo-variable is called LINES. This is true of at least bash and mksh. --- lib/lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/lib.c b/lib/lib.c index 9664bec..99d2ea6 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. -- cgit v1.2.3