Render actions in italic
Also render italic as normal if it's unsupported, as that is what would happen anyway if curses has A_ITALIC but the terminal has no sitm. That format string is kinda bad.weechat-hashes
parent
e1f10958c9
commit
34514cf2ee
8
handle.c
8
handle.c
|
@ -294,14 +294,16 @@ static void handlePrivmsg(struct Message *msg) {
|
||||||
bool notice = (msg->cmd[0] == 'N');
|
bool notice = (msg->cmd[0] == 'N');
|
||||||
bool action = isAction(msg);
|
bool action = isAction(msg);
|
||||||
bool mention = !mine && isMention(msg);
|
bool mention = !mine && isMention(msg);
|
||||||
|
const char *italic = (action ? "\35" : "");
|
||||||
|
const char *reverse = (mention ? "\26" : "");
|
||||||
uiFormat(
|
uiFormat(
|
||||||
id, (!notice && (mention || query) ? Hot : Warm), tagTime(msg),
|
id, (!notice && (mention || query) ? Hot : Warm), tagTime(msg),
|
||||||
"%s\3%d%s%s%s\17\t%s",
|
"%s%s\3%d%s%s%s\3%s\t%s",
|
||||||
(mention ? "\26" : ""),
|
italic, reverse, hash(msg->user),
|
||||||
hash(msg->user),
|
|
||||||
(action ? "* " : notice ? "-" : "<"),
|
(action ? "* " : notice ? "-" : "<"),
|
||||||
msg->nick,
|
msg->nick,
|
||||||
(action ? "" : notice ? "-" : ">"),
|
(action ? "" : notice ? "-" : ">"),
|
||||||
|
reverse,
|
||||||
msg->params[1]
|
msg->params[1]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue