summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-08-06 23:13:58 +0200
committerSebastien Helleu <flashcode@flashtux.org>2011-08-06 23:13:58 +0200
commitb9d614e7dee330da81720a181a1275c15ab10e0e (patch)
tree40db2625a71e019957bebc40ccf495868dfe90db /src/gui
parent339d33181dbf61150817ea59bab673f1fc5b48b2 (diff)
downloadweechat-b9d614e7dee330da81720a181a1275c15ab10e0e.zip
core: fix unwanted merge of buffers when no layout number is assigned to buffer (on /layout apply)
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/gui-layout.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/gui-layout.c b/src/gui/gui-layout.c
index 52f711548..f9b2ee0cd 100644
--- a/src/gui/gui-layout.c
+++ b/src/gui/gui-layout.c
@@ -262,9 +262,12 @@ gui_layout_buffer_apply (struct t_gui_layout_buffer *layout_buffers)
{
ptr_next_buffer = ptr_buffer->next_buffer;
- if (ptr_buffer->layout_number == (ptr_buffer->prev_buffer)->layout_number)
+ if ((ptr_buffer->layout_number >= 1)
+ && (ptr_buffer->layout_number == (ptr_buffer->prev_buffer)->layout_number))
+ {
gui_buffer_merge (ptr_buffer, ptr_buffer->prev_buffer);
-
+ }
+
ptr_buffer = ptr_next_buffer;
}