|--- grub-0.93.orig/ChangeLog 2002-12-04 05:42:41.000000000 +0100 |+++ grub-0.93/ChangeLog 2003-09-29 23:50:03.000000000 +0200 |@@ -1,3 +1,8 @@ |+2003-09-30 Daniele Bellucci <[EMAIL PROTECTED]> |+ |+ * stage2/char_io.c (real_get_cmdline): Added the following Eamcs
arghhh i had a mistake ;( [s/Eamcs/Emacs] the following correct: --- grub-0.93.orig/ChangeLog 2002-12-04 05:42:41.000000000 +0100 +++ grub-0.93/ChangeLog 2003-09-29 23:50:03.000000000 +0200 @@ -1,4 +1,9 @@ +2003-09-30 Daniele Bellucci <[EMAIL PROTECTED]> + + * stage2/char_io.c (real_get_cmdline): Added the following Emacs + binding: C-SPC, C-w. + 2002-12-04 Yoshinori K. Okuji <[EMAIL PROTECTED]> * stage2/builtins.c (embed_func): When checking if the disk can --- grub-0.93.orig/stage2/char_io.c 2002-12-03 00:49:07.000000000 +0100 +++ grub-0.93/stage2/char_io.c 2003-09-29 23:46:58.000000000 +0200 @@ -312,6 +312,7 @@ until this code is freezed. */ #define CMDLINE_WIDTH 78 #define CMDLINE_MARGIN 10 +#define min(a,b) ( a < b )?a: b int xpos, lpos, c, section; /* The length of PROMPT. */ @@ -320,6 +321,8 @@ int llen; /* The index for the history. */ int history = -1; + /* The index for the marker. */ + int kpos = -1; /* The working buffer for the command-line. */ char *buf = (char *) CMDLINE_BUF; /* The kill buffer. */ @@ -635,6 +638,30 @@ cl_init (); } break; + case 0: + kpos = lpos; /* C-SPC set the mark */ + break; + case 23: /* C-w move to killbuffer */ + if (kpos != -1) + { + int count; + if (lpos > kpos) + { + grub_memmove (kill_buf, buf + kpos, lpos - kpos); + kill_buf[lpos-kpos] = 0; + count = lpos; + cl_backward (lpos - kpos); + cl_delete (count - kpos); + } + else + { + grub_memmove (kill_buf, buf + lpos, kpos - lpos); + kill_buf[kpos-lpos] = 0; + cl_delete (kpos - lpos); + } + kpos = lpos; + } + break; case 1: /* C-a go to beginning of line */ cl_backward (lpos); break; -- Daniele. _______________________________________________ Bug-grub mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-grub