[palo patch] Implement CTRL-U functionality
Randolph Chung <[email protected]> Fri, 06 Jul 2007 16:44:05 -0700
| Newsgroups | gmane.linux.ports.hppa |
|---|---|
| Message-ID | <[email protected]> |
I keep on meaning to do this, and have finally done it..... The attached patch makes the palo "editor" understand CTRL-U, so that you can quickly clear out a particular command line parameter. Any comments? If not I will commit this in a few days, and hope that the Debian/Ubuntu/Gentoo folks eventually pick it up :) randolph _______________________________________________ parisc-linux mailing list [email protected] http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
palo.diff
(text/plain, 428 B)
diff --git a/ipl/lib.c b/ipl/lib.c
index 544385e..06d790c 100644
--- a/ipl/lib.c
+++ b/ipl/lib.c
@@ -242,6 +242,17 @@ char *enter_text(char *txt, int maxchars)
putchar(' ');
putchar(c);
}
+ } else if (c == 21)
+ { /* CTRL-U */
+ while (pos)
+ {
+ pos--;
+ c='\b';
+ putchar(c);
+ putchar(' ');
+ putchar(c);
+ }
+ txt[0] = 0;
} else if ((pos < maxchars) && c >= ' ')
{
txt[pos] = c;