summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-07-03 15:30:49 +0200
committerSebastien Helleu <flashcode@flashtux.org>2009-07-03 15:30:49 +0200
commitd7f3e59c3edcbb500988cb22686761c4f34fa895 (patch)
tree1df4bf871198b54116f3e38b7db994af5fad105a /src
parent49aa853b0050e11d25977c43fa5310efcdd14744 (diff)
downloadweechat-d7f3e59c3edcbb500988cb22686761c4f34fa895.zip
Fix bug when moving group of merged buffers to number 1
Diffstat (limited to 'src')
-rw-r--r--src/gui/gui-buffer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 3a79a4059..719ad43f2 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -1723,10 +1723,10 @@ gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number)
if (ptr_buffer == ptr_last_buffer)
break;
}
- gui_buffers->prev_buffer = buffer;
- buffer->prev_buffer = NULL;
- buffer->next_buffer = gui_buffers;
- gui_buffers = buffer;
+ gui_buffers->prev_buffer = ptr_last_buffer;
+ ptr_first_buffer->prev_buffer = NULL;
+ ptr_last_buffer->next_buffer = gui_buffers;
+ gui_buffers = ptr_first_buffer;
}
else
{
@@ -1734,7 +1734,7 @@ gui_buffer_move_to_number (struct t_gui_buffer *buffer, int number)
for (ptr_buffer_pos = gui_buffers; ptr_buffer_pos;
ptr_buffer_pos = ptr_buffer_pos->next_buffer)
{
- if (ptr_buffer_pos->number == number)
+ if (ptr_buffer_pos->number >= number)
break;
}
if (ptr_buffer_pos)