1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 13:26:38 +02:00

core: update text in command history when pressing (ctrl-)up

This commit is contained in:
Sebastien Helleu
2011-10-03 23:21:07 +02:00
parent e93647db95
commit 9206036233
+6
View File
@@ -1109,6 +1109,12 @@ gui_input_history_next (struct t_gui_window *window,
if (*ptr_history)
{
/* replace text in history with current input */
window->buffer->input_buffer[window->buffer->input_buffer_size] = '\0';
if ((*ptr_history)->text)
free ((*ptr_history)->text);
(*ptr_history)->text = strdup (window->buffer->input_buffer);
*ptr_history = (*ptr_history)->prev_history;
if (*ptr_history)
{