summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/wee-upgrade.c35
-rw-r--r--src/gui/gui-line.c2
2 files changed, 26 insertions, 11 deletions
diff --git a/src/core/wee-upgrade.c b/src/core/wee-upgrade.c
index b42f5d506..e9933230e 100644
--- a/src/core/wee-upgrade.c
+++ b/src/core/wee-upgrade.c
@@ -458,19 +458,32 @@ upgrade_weechat_read_cb (void *data,
/* add line to current buffer */
if (upgrade_current_buffer)
{
- new_line = gui_line_add (
- upgrade_current_buffer,
- infolist_time (infolist, "date"),
- infolist_time (infolist, "date_printed"),
- infolist_string (infolist, "tags"),
- infolist_string (infolist, "prefix"),
- infolist_string (infolist, "message"));
- if (new_line)
+ switch (upgrade_current_buffer->type)
{
- new_line->data->highlight = infolist_integer (infolist, "highlight");
+ case GUI_BUFFER_TYPE_FORMATTED:
+ new_line = gui_line_add (
+ upgrade_current_buffer,
+ infolist_time (infolist, "date"),
+ infolist_time (infolist, "date_printed"),
+ infolist_string (infolist, "tags"),
+ infolist_string (infolist, "prefix"),
+ infolist_string (infolist, "message"));
+ if (new_line)
+ {
+ new_line->data->highlight = infolist_integer (infolist, "highlight");
+ if (infolist_integer (infolist, "last_read_line"))
+ upgrade_current_buffer->lines->last_read_line = new_line;
+ }
+ break;
+ case GUI_BUFFER_TYPE_FREE:
+ gui_line_add_y (
+ upgrade_current_buffer,
+ infolist_integer (infolist, "y"),
+ infolist_string (infolist, "message"));
+ break;
+ case GUI_BUFFER_NUM_TYPES:
+ break;
}
- if (infolist_integer (infolist, "last_read_line"))
- upgrade_current_buffer->lines->last_read_line = new_line;
}
break;
case UPGRADE_WEECHAT_TYPE_NICKLIST:
diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c
index b73d75805..269b79154 100644
--- a/src/gui/gui-line.c
+++ b/src/gui/gui-line.c
@@ -996,6 +996,8 @@ gui_line_add_to_infolist (struct t_infolist *infolist,
if (!ptr_item)
return 0;
+ if (!infolist_new_var_integer (ptr_item, "y", line->data->y))
+ return 0;
if (!infolist_new_var_time (ptr_item, "date", line->data->date))
return 0;
if (!infolist_new_var_time (ptr_item, "date_printed", line->data->date_printed))