diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fe-text/gui-readline.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index 0171dc8d..b7b60038 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -210,6 +210,7 @@ void handle_key(int key) gui_entry_erase(1); break; + case 4: case KEY_DC: if (gui_entry_get_pos() < strlen(gui_entry_get_text())) { gui_entry_move_pos(1); @@ -217,6 +218,14 @@ void handle_key(int key) } break; + case 11: + /* C-K - erase the rest of the line */ + c = gui_entry_get_pos(); + gui_entry_set_pos(strlen(gui_entry_get_text())); + gui_entry_erase(strlen(gui_entry_get_text()) - c); + gui_entry_move_pos(0); + break; + case 0: /* Ctrl-space - ignore */ break; |