mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
delete_next_word key implemented, patch by Tinuk
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1311 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
95c17bafc4
commit
88094fa9f2
@ -183,6 +183,24 @@ void gui_entry_erase_word(void)
|
||||
entry_update();
|
||||
}
|
||||
|
||||
void gui_entry_erase_next_word(void)
|
||||
{
|
||||
int to = pos;
|
||||
|
||||
if (pos == entry->len) return;
|
||||
|
||||
while (entry->str[to] == ' ' && to < entry->len)
|
||||
to++;
|
||||
|
||||
while (entry->str[to] != ' ' && to < entry->len)
|
||||
to++;
|
||||
|
||||
g_string_erase(entry, pos, to - pos);
|
||||
|
||||
entry_screenpos();
|
||||
entry_update();
|
||||
}
|
||||
|
||||
int gui_entry_get_pos(void)
|
||||
{
|
||||
return pos;
|
||||
|
@ -16,6 +16,7 @@ void gui_entry_insert_char(char chr);
|
||||
|
||||
void gui_entry_erase(int size);
|
||||
void gui_entry_erase_word(void);
|
||||
void gui_entry_erase_next_word(void);
|
||||
|
||||
int gui_entry_get_pos(void);
|
||||
void gui_entry_set_pos(int pos);
|
||||
|
@ -385,12 +385,12 @@ static void key_backspace(void)
|
||||
|
||||
static void key_delete_previous_word(void)
|
||||
{
|
||||
/* FIXME */
|
||||
gui_entry_erase_word();
|
||||
}
|
||||
|
||||
static void key_delete_next_word(void)
|
||||
{
|
||||
/* FIXME */
|
||||
gui_entry_erase_next_word();
|
||||
}
|
||||
|
||||
static void key_delete_to_previous_space(void)
|
||||
|
Loading…
Reference in New Issue
Block a user