summaryrefslogtreecommitdiffstats
path: root/lib/readline.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/readline.c')
-rw-r--r--lib/readline.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/readline.c b/lib/readline.c
index d026af1..3d16c18 100644
--- a/lib/readline.c
+++ b/lib/readline.c
@@ -290,9 +290,17 @@ int readline(const char *prompt, char *buf, int len)
insert = !insert;
break;
case BB_KEY_ERASE_LINE:
+ BEGINNING_OF_LINE();
+ ERASE_TO_EOL();
+ break;
case CTL_CH('u'):
+ wlen = eol_num - num;
+ memmove(buf, buf+num, wlen);
BEGINNING_OF_LINE();
ERASE_TO_EOL();
+ eol_num = wlen;
+ REFRESH_TO_EOL();
+ BEGINNING_OF_LINE();
break;
case DEL:
case BB_KEY_DEL7: