summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/dmenu.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-08-01 10:58:54 +0000
committerjkh <jkh@FreeBSD.org>1996-08-01 10:58:54 +0000
commitaf06a2d9e69e86a80a2559942d364be66f5dd707 (patch)
treeafaaedec3fc4f42484fac5946e067d2a60975056 /usr.sbin/sysinstall/dmenu.c
parent8ff2c2006196d9a599bf8020a3c2b7c5b61f3b72 (diff)
downloadFreeBSD-src-af06a2d9e69e86a80a2559942d364be66f5dd707.zip
FreeBSD-src-af06a2d9e69e86a80a2559942d364be66f5dd707.tar.gz
Close PR#1542. Don't just assume 24 lines, get the tty size.
Some things may still display text on the 24th line, but that's because they've always been screens designed to fit into a minimal real-estate and have hardwired assumptions about the dimensions. They'll be a little harder to make dynamic.
Diffstat (limited to 'usr.sbin/sysinstall/dmenu.c')
-rw-r--r--usr.sbin/sysinstall/dmenu.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/dmenu.c b/usr.sbin/sysinstall/dmenu.c
index 89f2edd..dcd742f 100644
--- a/usr.sbin/sysinstall/dmenu.c
+++ b/usr.sbin/sysinstall/dmenu.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
- * $Id: dmenu.c,v 1.22 1996/07/05 08:35:53 jkh Exp $
+ * $Id: dmenu.c,v 1.23 1996/07/11 18:37:47 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -171,7 +171,10 @@ menu_height(DMenu *menu, int n)
int max;
char *t;
- for (t = menu->prompt, max = MAX_MENU; *t; t++) {
+ max = MAX_MENU;
+ if (StatusLine > 24)
+ max += StatusLine - 24;
+ for (t = menu->prompt; *t; t++) {
if (*t == '\n')
--max;
}
OpenPOWER on IntegriCloud