diff options
author | Timo Sirainen <cras@irssi.org> | 2000-05-09 12:55:38 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-05-09 12:55:38 +0000 |
commit | ef6b0a1ad967c74ab957bbfa3f167e95fcf6c7a7 (patch) | |
tree | 6311d2f16a1f61e3a7713d13025c5b13aa353608 /src | |
parent | 549d504b92376c315163e8c893a2b24588ad6022 (diff) | |
download | irssi-ef6b0a1ad967c74ab957bbfa3f167e95fcf6c7a7.zip |
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
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; |