diff options
author | Helge Deller <deller@gmx.de> | 2014-06-09 14:48:53 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2014-06-09 14:48:53 +0200 |
commit | 474fc18fa434b3fd0f7d6a49f6d2dc22712cd3ee (patch) | |
tree | 44b40c41002ed0e7af5c682eb201a7a36cd08572 | |
parent | f6150793f77435959c1a27d4f0675adb0a09bf45 (diff) | |
download | palo-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.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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; |