diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2016-10-29 17:18:28 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2016-10-29 17:18:28 +0200 |
commit | 570f4817dd0267f713d31f15453bb56acc6a19b8 (patch) | |
tree | 8b3434e7de1920f594d9d7b258ba3557cfcafc5f /src/gui/curses | |
parent | d4a9c48cc85856b76277c20429a1dc8062ee3af3 (diff) | |
download | weechat-570f4817dd0267f713d31f15453bb56acc6a19b8.zip |
core: fix display of empty lines in search mode (closes #829)
Diffstat (limited to 'src/gui/curses')
-rw-r--r-- | src/gui/curses/gui-curses-chat.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c index 05586d037..350010e67 100644 --- a/src/gui/curses/gui-curses-chat.c +++ b/src/gui/curses/gui-curses-chat.c @@ -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) |