diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2018-08-12 21:45:00 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2018-08-12 21:45:00 +0200 |
commit | 42be1a74a036bb0318201a40d91eadc7d9d6454f (patch) | |
tree | 0aab3de96b55a97e12aa051b839e4297dbf3f559 /src/core/wee-upgrade.c | |
parent | 12a6f74ec01d9daa2e23dce5ab15b1ee3ce09006 (diff) | |
download | weechat-42be1a74a036bb0318201a40d91eadc7d9d6454f.zip |
api: add function hook_line
Diffstat (limited to 'src/core/wee-upgrade.c')
-rw-r--r-- | src/core/wee-upgrade.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/core/wee-upgrade.c b/src/core/wee-upgrade.c index 5afa33266..30f131646 100644 --- a/src/core/wee-upgrade.c +++ b/src/core/wee-upgrade.c @@ -631,7 +631,8 @@ upgrade_weechat_read_buffer_line (struct t_infolist *infolist) switch (upgrade_current_buffer->type) { case GUI_BUFFER_TYPE_FORMATTED: - new_line = gui_line_add (upgrade_current_buffer, + new_line = gui_line_new (upgrade_current_buffer, + -1, infolist_time (infolist, "date"), infolist_time (infolist, "date_printed"), infolist_string (infolist, "tags"), @@ -639,6 +640,7 @@ upgrade_weechat_read_buffer_line (struct t_infolist *infolist) infolist_string (infolist, "message")); if (new_line) { + gui_line_add (new_line); new_line->data->highlight = infolist_integer (infolist, "highlight"); if (infolist_integer (infolist, "last_read_line")) @@ -646,9 +648,12 @@ upgrade_weechat_read_buffer_line (struct t_infolist *infolist) } break; case GUI_BUFFER_TYPE_FREE: - gui_line_add_y (upgrade_current_buffer, - infolist_integer (infolist, "y"), - infolist_string (infolist, "message")); + new_line = gui_line_new (upgrade_current_buffer, + infolist_integer (infolist, "y"), + 0, 0, NULL, NULL, + infolist_string (infolist, "message")); + if (new_line) + gui_line_add_y (new_line); break; case GUI_BUFFER_NUM_TYPES: break; |