diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2007-07-01 11:20:34 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2007-07-01 11:20:34 +0000 |
commit | 585681e5a075abf07fb465ac8865a4f210bbd1cb (patch) | |
tree | 5d5def32f3adb107703bd681836a44782b461e65 /src | |
parent | cd3599e6db955ec16ddc861d00efbce1fe269ab8 (diff) | |
download | weechat-585681e5a075abf07fb465ac8865a4f210bbd1cb.zip |
Down key now saves input to history and clears input line (task #7049)
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/gui-action.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/gui-action.c b/src/gui/gui-action.c index 9e4c85328..0db9e7ffd 100644 --- a/src/gui/gui-action.c +++ b/src/gui/gui-action.c @@ -859,6 +859,23 @@ gui_action_down (t_gui_window *window, char *args) } gui_input_draw (window->buffer, 0); } + else + { + /* add line to history then clear input */ + if (window->buffer->input_buffer_size > 0) + { + window->buffer->input_buffer[window->buffer->input_buffer_size] = '\0'; + window->buffer->input_buffer_color_mask[window->buffer->input_buffer_size] = '\0'; + history_buffer_add (window->buffer, window->buffer->input_buffer); + history_global_add (window->buffer->input_buffer); + window->buffer->input_buffer_size = 0; + window->buffer->input_buffer_length = 0; + gui_input_optimize_size (window->buffer); + window->buffer->input_buffer_pos = 0; + window->buffer->input_buffer_1st_display = 0; + gui_input_draw (window->buffer, 0); + } + } } else { |