diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-05-06 18:33:00 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-05-06 18:33:00 +0200 |
commit | 5689970cb1db504aa6a9bda901f7861e4a6d9fc4 (patch) | |
tree | 1b7c18ce95226b54f3c88cca4b2d6385a0a80bd9 /src/gui/gui-buffer.c | |
parent | 6d37f185c09c9ec8fe21862d9f214c5747a64654 (diff) | |
download | weechat-5689970cb1db504aa6a9bda901f7861e4a6d9fc4.zip |
Fix bug when user closes buffer with free content: buffers with higher number were not decreased
Diffstat (limited to 'src/gui/gui-buffer.c')
-rw-r--r-- | src/gui/gui-buffer.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 9b8648f61..085371c35 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -778,19 +778,16 @@ gui_buffer_close (struct t_gui_buffer *buffer, int switch_to_another) if (gui_previous_buffer == buffer) gui_previous_buffer = NULL; - if (buffer->type == GUI_BUFFER_TYPE_FORMATED) + /* decrease buffer number for all next buffers */ + for (ptr_buffer = buffer->next_buffer; ptr_buffer; + ptr_buffer = ptr_buffer->next_buffer) { - /* decrease buffer number for all next buffers */ - for (ptr_buffer = buffer->next_buffer; ptr_buffer; - ptr_buffer = ptr_buffer->next_buffer) - { - ptr_buffer->number--; - } - - /* free all lines */ - gui_chat_line_free_all (buffer); + ptr_buffer->number--; } + /* free all lines */ + gui_chat_line_free_all (buffer); + /* free some data */ if (buffer->title) free (buffer->title); |