From 2832ef333e611f4d138b386265a989aea4cc48ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 23 Nov 2025 09:45:09 +0100 Subject: [PATCH] core: do not add/remove highlight words if value is empty in call to gui_buffer_set() --- src/gui/gui-buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 7cf0f2a48..771581767 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -1971,7 +1971,7 @@ gui_buffer_add_highlight_words (struct t_gui_buffer *buffer, int current_count, add_count, i; struct t_weelist *list; - if (!buffer || !words_to_add) + if (!buffer || !words_to_add || !words_to_add[0]) return; list = weelist_new (); @@ -2020,7 +2020,7 @@ gui_buffer_remove_highlight_words (struct t_gui_buffer *buffer, int current_count, remove_count, i, j, to_remove; struct t_weelist *list; - if (!buffer || !words_to_remove) + if (!buffer || !words_to_remove || !words_to_remove[0]) return; list = weelist_new ();