summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhpa <hpa>2005-08-28 23:58:15 +0000
committerhpa <hpa>2005-08-28 23:58:15 +0000
commit5bf109581580c36e908b27e23fa6977f66e13d02 (patch)
tree6161c9d259b4473affea1e21ada87adef8df93bd
parent2c1569dda923a2f58b63c4a10c44c30f20d49ec9 (diff)
downloadsyslinux-5bf109581580c36e908b27e23fa6977f66e13d02.tar.gz
Reorganize so that a 512-character command line fits on an 80x24 screen
-rw-r--r--com32/modules/menu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/com32/modules/menu.c b/com32/modules/menu.c
index 5ba7719a..2950c6a6 100644
--- a/com32/modules/menu.c
+++ b/com32/modules/menu.c
@@ -87,7 +87,7 @@ struct menu_parameter mparm[] = {
{ "passwordmargin", 3 },
{ "rows", 12 },
{ "tabmsgrow", 18 },
- { "cmdlinerow", 20 },
+ { "cmdlinerow", 18 },
{ "endrow", 24 },
{ "passwordrow", 11 },
{ "timeoutrow", 20 },
@@ -299,7 +299,7 @@ ask_passwd(const char *menu_entry)
static void
-draw_menu(int sel, int top)
+draw_menu(int sel, int top, int edit_line)
{
int x, y;
int sbtop = 0, sbbot = 0;
@@ -336,7 +336,7 @@ draw_menu(int sel, int top)
putchar('q');
fputs("j\017", stdout);
- if ( allowedit && !menu_master_passwd )
+ if ( edit_line && allowedit && !menu_master_passwd )
printf("%s\033[%d;1H%s", menu_attrib->tabmsg, TABMSG_ROW,
pad_line("Press [Tab] to edit options", 1, WIDTH));
@@ -362,7 +362,7 @@ edit_cmdline(char *input, int top)
/* Enable ASCII on G0 and DEC VT on G1; do it in this order
to avoid confusing the Linux console */
printf("\033e\033%%@\033)0\033(B%s\033[?25l\033[2J", menu_attrib->screen);
- draw_menu(-1, top);
+ draw_menu(-1, top, 1);
prev_len = 0;
}
@@ -517,7 +517,7 @@ run_menu(void)
}
if ( top != prev_top ) {
- draw_menu(entry, top);
+ draw_menu(entry, top, 1);
} else if ( entry != prev_entry ) {
draw_row(prev_entry-top+4, entry, top, 0, 0);
draw_row(entry-top+4, entry, top, 0, 0);
@@ -635,7 +635,7 @@ run_menu(void)
ok = ask_passwd(NULL);
clear_screen();
- draw_menu(-1, top);
+ draw_menu(-1, top, 0);
if ( ok ) {
cmdline = edit_cmdline(menu_entries[entry].cmdline, top);