From ef6b0a1ad967c74ab957bbfa3f167e95fcf6c7a7 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 9 May 2000 12:55:38 +0000 Subject: Ctrl-D = delete Ctrl-K = erase the rest of the line (patches by Tommi Komulainen) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@202 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/gui-readline.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') 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; -- cgit v1.2.3