From cfd5bf213cca412257c9bedf44bc99d1e51908c2 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Fri, 16 Apr 2021 16:37:47 -0400 Subject: Set id color from completion in /msg In the same way that /query copies the id color from completion. Also make both first check that a color isn't already set. --- command.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/command.c b/command.c index 0aefb2b..eae865e 100644 --- a/command.c +++ b/command.c @@ -135,8 +135,12 @@ static void commandMe(uint id, char *params) { } static void commandMsg(uint id, char *params) { - id = idFor(strsep(¶ms, " ")); - splitMessage("PRIVMSG", id, params); + char *nick = strsep(¶ms, " "); + uint msg = idFor(nick); + if (idColors[msg] == Default) { + idColors[msg] = completeColor(id, nick); + } + splitMessage("PRIVMSG", msg, params); } static void commandJoin(uint id, char *params) { @@ -357,7 +361,9 @@ static void commandCS(uint id, char *params) { static void commandQuery(uint id, char *params) { if (!params) return; uint query = idFor(params); - idColors[query] = completeColor(id, params); + if (idColors[query] == Default) { + idColors[query] = completeColor(id, params); + } uiShowID(query); } -- cgit 1.4.1 mp;follow=1'>commit diff
path: root/bin/up.sh (unfollow)
Commit message (Expand)Author
2019-12-20Set LANG in cgit filtersJune McEnroe
2019-12-20Source .editrc before applying -v or -eJune McEnroe
2019-12-20Disable signing commitsJune McEnroe
2019-12-19Ignore about-filterJune McEnroe
2019-12-19Fix matching make tags with no sourcesJune McEnroe
2019-12-19Avoid matching := assignments as tagsJune McEnroe
2019-12-18Hide line numbers when rendering mdocJune McEnroe
2019-12-18Customize cgit CSSJune McEnroe
2019-12-18Use :target rather than :focus pseudo-classJune McEnroe
2019-12-18Copy cgit auxiliary binaries properlyJune McEnroe
2019-12-18Add git.causal.agency cgit configJune McEnroe
2019-12-18Bail from hi if input is binaryJune McEnroe
2019-12-16Post "cgit setup"June McEnroe