diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2015-11-10 11:07:16 +0100 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2015-11-10 11:07:16 +0100 |
commit | ac04fa741355888d814c693e7e2b793c5413c3eb (patch) | |
tree | 3d617757a33377ecab9ece7b3445b3b5257f9af9 /src/fe-common | |
parent | 6d6e672e8e27469bd08704edb96c3e0fa9ef898f (diff) | |
parent | b333d103641b48b77ab76c6d31b1f3788192268f (diff) | |
download | irssi-ac04fa741355888d814c693e7e2b793c5413c3eb.zip |
Merge pull request #351 from vague666/hilight_default_behaviour
Fix /hilight list output behaviour depending on enabled flags
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/hilight-text.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index 87c5d467..9822de1e 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -484,10 +484,14 @@ static void hilight_print(int index, HILIGHT_REC *rec) GString *options; options = g_string_new(NULL); - if (!rec->nick || !rec->word) { - if (rec->nick) g_string_append(options, "-nick "); - if (rec->word) g_string_append(options, "-word "); - } + + if (rec->nick && rec->word) { /* default case, no option */ } + else if (rec->nick) + g_string_append(options, "-nick "); + else if (rec->word) + g_string_append(options, "-word "); + else + g_string_append(options, "-line "); if (rec->nickmask) g_string_append(options, "-mask "); if (rec->fullword) g_string_append(options, "-full "); |