core: fix display of empty lines in search mode (closes #829)

v2.8-utf8proc
Sébastien Helleu 2016-10-29 17:18:28 +02:00
parent d4a9c48cc8
commit 570f4817dd
2 changed files with 14 additions and 4 deletions

View File

@ -24,6 +24,7 @@ Improvements::
Bug fixes::
* core: fix display of empty lines in search mode (issue #829)
* relay: set status to "authentication failed" and close immediately connection in case of authentication failure in weechat and irc protocols (issue #825)
[[v1.6]]

View File

@ -1335,6 +1335,10 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
}
/* display message */
ptr_data = NULL;
message_with_tags = NULL;
message_with_search = NULL;
if (line->data->message && line->data->message[0])
{
message_with_tags = (gui_chat_display_tags) ?
@ -1354,6 +1358,10 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
if (message_with_search)
ptr_data = message_with_search;
}
}
if (ptr_data && ptr_data[0])
{
while (ptr_data && ptr_data[0])
{
gui_chat_get_word_info (window,
@ -1443,10 +1451,6 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
ptr_data = NULL;
}
}
if (message_with_tags)
free (message_with_tags);
if (message_with_search)
free (message_with_search);
}
else
{
@ -1455,6 +1459,11 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
&lines_displayed, simulate);
}
if (message_with_tags)
free (message_with_tags);
if (message_with_search)
free (message_with_search);
/* display message if day has changed after this line */
if ((line->data->date != 0)
&& CONFIG_BOOLEAN(config_look_day_change)