1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 06:16:40 +02:00

Down key now saves input to history and clears input line (task #7049)

This commit is contained in:
Sebastien Helleu
2007-07-01 11:20:34 +00:00
parent cd3599e6db
commit 585681e5a0
4 changed files with 38 additions and 2 deletions
+2 -1
View File
@@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2007-06-12
ChangeLog - 2007-07-01
Version 0.2.6 (under dev!):
* down key now saves input to history and clears input line (task #7049)
* fixed log file when channel name contains "/" (bug #20072)
* command /away allowed when not connected to server (internally stored
and AWAY command is sent when connecting to server) (task #7003)
+17
View File
@@ -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
{
+2 -1
View File
@@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
ChangeLog - 2007-06-12
ChangeLog - 2007-07-01
Version 0.2.6 (under dev!):
* down key now saves input to history and clears input line (task #7049)
* fixed log file when channel name contains "/" (bug #20072)
* command /away allowed when not connected to server (internally stored
and AWAY command is sent when connecting to server) (task #7003)
+17
View File
@@ -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
{