Hi,

Commit 1949 introduced a bug using TAB due a miss-understanding that I
had with the code.

Find an attached patch that fix it.

Brief ok from someone?

-- 
Carles Pina i Estany
        http://pinux.info
=== modified file 'ChangeLog'
--- ChangeLog	2009-12-25 23:50:59 +0000
+++ ChangeLog	2009-12-26 00:17:47 +0000
@@ -1,5 +1,11 @@
 2009-12-26  Carles Pina i Estany  <car...@pina.cat>
 
+	* normal/cmdline.c (grub_cmdline_get): Print a space after prompt.
+	* normal/main.c (grub_normal_read_line): Remove a space from the
+	default prompt.
+
+2009-12-26  Carles Pina i Estany  <car...@pina.cat>
+
 	* commands/help.c (grub_cmd_help): Print the command name before the
 	summary.
 	(GRUB_MOD_INIT): Remove command name from the summary.

=== modified file 'normal/cmdline.c'
--- normal/cmdline.c	2009-12-20 23:32:15 +0000
+++ normal/cmdline.c	2009-12-26 00:19:41 +0000
@@ -268,14 +268,14 @@ grub_cmdline_get (const char *prompt, ch
       grub_refresh ();
     }
 
-  plen = grub_strlen (prompt_translated);
+  plen = grub_strlen (prompt_translated) + 1;
   lpos = llen = 0;
   buf[0] = '\0';
 
   if ((grub_getxy () >> 8) != 0)
     grub_putchar ('\n');
 
-  grub_printf ("%s", prompt_translated);
+  grub_printf ("%s ", prompt_translated);
 
   xpos = plen;
   ystart = ypos = (grub_getxy () & 0xFF);

=== modified file 'normal/main.c'
--- normal/main.c	2009-12-23 16:41:32 +0000
+++ normal/main.c	2009-12-26 00:10:33 +0000
@@ -546,9 +546,9 @@ static grub_err_t
 grub_normal_read_line (char **line, int cont)
 {
   grub_parser_t parser = grub_parser_get_current ();
-  char prompt[sizeof("> ") + grub_strlen (parser->name)];
+  char prompt[sizeof(">") + grub_strlen (parser->name)];
 
-  grub_sprintf (prompt, "%s> ", parser->name);
+  grub_sprintf (prompt, "%s>", parser->name);
 
   while (1)
     {

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to