From 3c9c11af7a6b1a38d77d86fe71dd5b0a13598d9e Mon Sep 17 00:00:00 2001 From: Jari Matilainen Date: Sun, 4 Oct 2015 17:29:47 +0200 Subject: [PATCH] Make /hilight list be specific with regards to -nick/-word/-line, v3 --- src/fe-common/core/hilight-text.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index 8031fda9..70ec48ab 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -484,10 +484,10 @@ static void hilight_print(int index, HILIGHT_REC *rec) GString *options; options = g_string_new(NULL); - if (rec->nick) - g_string_append(options, "-nick "); - else if (rec->word) - g_string_append(options, "-word "); + if (rec->nick || rec->word) { + if (rec->nick) g_string_append(options, "-nick "); + if (rec->word) g_string_append(options, "-word "); + } else if (rec->line) g_string_append(options, "-line ");