Index: layout.c =================================================================== RCS file: /cvsroot/mc/mc/src/layout.c,v retrieving revision 1.96 diff -u -r1.96 layout.c --- layout.c 25 Sep 2006 08:34:48 -0000 1.96 +++ layout.c 9 Oct 2006 21:42:41 -0000 @@ -87,6 +87,9 @@ /* Set if the command prompt is to be displayed */ int command_prompt = 1; +/* Set if the command line appears on top of the screen */ +int command_ontop = 0; + /* Set if the nice and useful keybar is visible */ int keybar_visible = 1; @@ -122,6 +125,7 @@ static int _menubar_visible; static int _output_lines; static int _command_prompt; +static int _command_ontop; static int _keybar_visible; static int _message_visible; static int _xterm_title; @@ -159,6 +163,7 @@ { N_("h&Intbar visible"), &message_visible, 0 }, { N_("&Keybar visible"), &keybar_visible, 0 }, { N_("command &Prompt"), &command_prompt, 0 }, + { N_("command prompt on &Top"), &command_ontop, 0 }, { N_("show &Mini status"), &show_mini_info, 0 }, { N_("menu&Bar visible"), &menubar_visible, 0 }, { N_("&Equal split"), &equal_split, 0 }, @@ -466,6 +471,7 @@ _equal_split = equal_split; _menubar_visible = menubar_visible; _command_prompt = command_prompt; + _command_ontop = command_ontop; _keybar_visible = keybar_visible; _message_visible = message_visible; _xterm_title = xterm_title; @@ -645,6 +651,7 @@ { int start_y; int promptl; /* the prompt len */ + int command_y; /* y position of the command line */ if (console_flag) { int minimum; @@ -664,7 +671,7 @@ message_visible; } check_split (); - start_y = menubar_visible; + start_y = menubar_visible + command_ontop * command_prompt; /* The column computing is defered until panel_do_cols */ if (horizontal_split) { @@ -688,13 +695,23 @@ widget_set_size (&the_menubar->widget, 0, 0, 1, COLS); + /* + * If the command prompt line is on top of the screen, we have to + * re-define its y position + */ + if (command_ontop) { + command_y = menubar_visible; + } else { + command_y = LINES - 1 - keybar_visible; + } + if (command_prompt) { - widget_set_size (&cmdline->widget, LINES - 1 - keybar_visible, + widget_set_size (&cmdline->widget, command_y, promptl, 1, COLS - promptl - (keybar_visible ? 0 : 1)); winput_set_origin (cmdline, promptl, COLS - promptl - (keybar_visible ? 0 : 1)); - widget_set_size (&the_prompt->widget, LINES - 1 - keybar_visible, + widget_set_size (&the_prompt->widget, command_y, 0, 1, promptl); } else { widget_set_size (&cmdline->widget, 0, 0, 0, 0); Index: layout.h =================================================================== RCS file: /cvsroot/mc/mc/src/layout.h,v retrieving revision 1.10 diff -u -r1.10 layout.h --- layout.h 3 Dec 2004 19:17:47 -0000 1.10 +++ layout.h 9 Oct 2006 21:42:41 -0000 @@ -35,6 +35,7 @@ extern int first_panel_size; extern int output_lines; extern int command_prompt; +extern int command_ontop; extern int keybar_visible; extern int output_start_y; extern int message_visible; Index: setup.c =================================================================== RCS file: /cvsroot/mc/mc/src/setup.c,v retrieving revision 1.92 diff -u -r1.92 setup.c --- setup.c 23 Feb 2006 15:32:18 -0000 1.92 +++ setup.c 9 Oct 2006 21:42:44 -0000 @@ -130,6 +130,7 @@ { "xterm_title", &xterm_title }, { "output_lines", &output_lines }, { "command_prompt", &command_prompt }, + { "command_ontop", &command_ontop }, { "menubar_visible", &menubar_visible }, { "show_mini_info", &show_mini_info }, { "permission_mode", &permission_mode },