diff options
-rw-r--r-- | src/gui/gui-common.c | 7 | ||||
-rw-r--r-- | weechat/src/gui/gui-common.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/gui-common.c b/src/gui/gui-common.c index 445eca13d..877ded5e4 100644 --- a/src/gui/gui-common.c +++ b/src/gui/gui-common.c @@ -349,6 +349,7 @@ void gui_buffer_free (t_gui_buffer *buffer) { t_gui_window *ptr_win; + t_gui_buffer *ptr_buffer; t_gui_line *ptr_line; int create_new; @@ -361,6 +362,12 @@ gui_buffer_free (t_gui_buffer *buffer) gui_switch_to_previous_buffer (ptr_win); } + /* 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 lines and messages */ while (buffer->lines) { diff --git a/weechat/src/gui/gui-common.c b/weechat/src/gui/gui-common.c index 445eca13d..877ded5e4 100644 --- a/weechat/src/gui/gui-common.c +++ b/weechat/src/gui/gui-common.c @@ -349,6 +349,7 @@ void gui_buffer_free (t_gui_buffer *buffer) { t_gui_window *ptr_win; + t_gui_buffer *ptr_buffer; t_gui_line *ptr_line; int create_new; @@ -361,6 +362,12 @@ gui_buffer_free (t_gui_buffer *buffer) gui_switch_to_previous_buffer (ptr_win); } + /* 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 lines and messages */ while (buffer->lines) { |