summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2014-06-09 14:48:53 +0200
committerHelge Deller <deller@gmx.de>2014-06-09 14:48:53 +0200
commit474fc18fa434b3fd0f7d6a49f6d2dc22712cd3ee (patch)
tree44b40c41002ed0e7af5c682eb201a7a36cd08572
parentf6150793f77435959c1a27d4f0675adb0a09bf45 (diff)
downloadpalo-474fc18fa434b3fd0f7d6a49f6d2dc22712cd3ee.tar.gz
Control-U key deletes whole line
While editing a boot parameter, the user can now use the Control-U key to delete the whole existing line and start over. Patch is originally from Randolph Chung <rchung42@gmail.com> from July 2007
-rw-r--r--ipl/lib.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/ipl/lib.c b/ipl/lib.c
index d417197..f529ee4 100644
--- a/ipl/lib.c
+++ b/ipl/lib.c
@@ -262,6 +262,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;