summaryrefslogtreecommitdiff
path: root/com32/menu/menumain.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2012-03-27 14:39:46 -0700
committerH. Peter Anvin <hpa@zytor.com>2012-03-27 14:39:46 -0700
commit6ab02b6682c0b693b3e4f9afcc2ab8775f804f0a (patch)
tree6dcc2cd05410d75e1d8f83eb0227932dfda9035d /com32/menu/menumain.c
parentcb05ff3e5a6aef2d1da2e4397b08e7eedde8c077 (diff)
downloadsyslinux-6ab02b6682c0b693b3e4f9afcc2ab8775f804f0a.tar.gz
menu: Make "menu clear" the default
Make "menu clear" the default... it was sort of implicitly so at least for vesamenu when using the old system, since we would end up zapping the mode when any output happened, but that no longer is the case. Also move the cursor to the top of the screen. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/menu/menumain.c')
-rw-r--r--com32/menu/menumain.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c
index 5b3f6bd1..a795cb2c 100644
--- a/com32/menu/menumain.c
+++ b/com32/menu/menumain.c
@@ -1108,7 +1108,7 @@ int main(int argc, char *argv[])
{
const char *cmdline;
struct menu *m;
- int rows, cols;
+ int rows, cols, cursorrow;
int i;
(void)argc;
@@ -1150,11 +1150,15 @@ int main(int argc, char *argv[])
local_cursor_enable(true);
cmdline = run_menu();
- if (clearmenu)
+ if (clearmenu) {
clear_screen();
+ cursorrow = 1;
+ } else {
+ cursorrow = END_ROW;
+ }
local_cursor_enable(false);
- printf("\033[?25h\033[%d;1H\033[0m", END_ROW);
+ printf("\033[?25h\033[%d;1H\033[0m", cursorrow);
if (cmdline) {
execute(cmdline, KT_NONE);