diff options
author | Ailin Nemui <ailin@esf51.localdomain> | 2014-07-08 13:42:06 +0200 |
---|---|---|
committer | Ailin Nemui <ailin@esf51.localdomain> | 2014-07-08 13:42:06 +0200 |
commit | a5a7fdbe5fb01654a832ad2cf482d40966e1d9df (patch) | |
tree | d0ae7b440d9419189f02a118e0247633493ed412 | |
parent | 05979c8d9f67cac7a80b496dc4e87b98df846399 (diff) | |
download | irssi-a5a7fdbe5fb01654a832ad2cf482d40966e1d9df.zip |
more strict rules for italic emphasis to avoid file name clashes
this additional check avoids /root/.hiddendir from italicising /root/,
because that is often used in path names
-rw-r--r-- | src/fe-common/core/fe-messages.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index 25c20109..fcc55a67 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -81,7 +81,8 @@ char *expand_emphasis(WI_ITEM_REC *item, const char *text) if ((end = strchr(bgn+1, *bgn)) == NULL) continue; if (!ishighalnum(end[-1]) || ishighalnum(end[1]) || - end[1] == type || end[1] == '*' || end[1] == '_') + end[1] == type || end[1] == '*' || end[1] == '_' || + (type == 29 && end[1] != NULL && ishighalnum(end[2]))) continue; if (IS_CHANNEL(item)) { |