diff options
author | Timo Sirainen <cras@irssi.org> | 2001-10-14 11:32:06 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-10-14 11:32:06 +0000 |
commit | 8c7243f19cbce92c5d3ee5c706a0fceb0c2bf749 (patch) | |
tree | badc16957bcf9b59d9c879b604c4f6ee709e3250 /src/fe-text/gui-readline.c | |
parent | 4e9ff3d6d82e9affdba88c14b59c956d7a8d1eef (diff) | |
download | irssi-8c7243f19cbce92c5d3ee5c706a0fceb0c2bf749.zip |
delete_previous_word and delete_next_word now deletes only until
non-alphanumeric character is found. added delete_to_next_space command.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1833 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/gui-readline.c')
-rw-r--r-- | src/fe-text/gui-readline.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c index 84fba1a9..6f9822e4 100644 --- a/src/fe-text/gui-readline.c +++ b/src/fe-text/gui-readline.c @@ -293,17 +293,22 @@ static void key_backspace(void) static void key_delete_previous_word(void) { - gui_entry_erase_word(active_entry); + gui_entry_erase_word(active_entry, FALSE); } static void key_delete_next_word(void) { - gui_entry_erase_next_word(active_entry); + gui_entry_erase_next_word(active_entry, FALSE); } static void key_delete_to_previous_space(void) { - gui_entry_erase_word(active_entry); + gui_entry_erase_word(active_entry, TRUE); +} + +static void key_delete_to_next_space(void) +{ + gui_entry_erase_next_word(active_entry, TRUE); } void readline(void) @@ -557,6 +562,7 @@ void gui_readline_init(void) key_bind("delete_next_word", "", NULL, NULL, (SIGNAL_FUNC) key_delete_next_word); key_bind("delete_previous_word", "", NULL, NULL, (SIGNAL_FUNC) key_delete_previous_word); key_bind("delete_to_previous_space", "", "^W", NULL, (SIGNAL_FUNC) key_delete_to_previous_space); + key_bind("delete_to_next_space", "", "", NULL, (SIGNAL_FUNC) key_delete_to_next_space); key_bind("erase_line", "", "^U", NULL, (SIGNAL_FUNC) key_erase_line); key_bind("erase_to_beg_of_line", "", NULL, NULL, (SIGNAL_FUNC) key_erase_to_beg_of_line); key_bind("erase_to_end_of_line", "", "^K", NULL, (SIGNAL_FUNC) key_erase_to_end_of_line); |