summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-10 20:58:14 -0500
committerJune McEnroe <june@causal.agency>2020-02-10 20:58:14 -0500
commit36e0bbc4cd783a826313de57fe77edf35e912d49 (patch)
tree08a9e680c059239ed836258b0f0def341acdfba2
parentReplace alignment tabs with spaces in bufferList (diff)
downloadcatgirl-36e0bbc4cd783a826313de57fe77edf35e912d49.tar.gz
catgirl-36e0bbc4cd783a826313de57fe77edf35e912d49.zip
Split on <> in colorMentions
This allows it to color the nick in the common case of pasting "<nick>
something they said" into the chat. Technically it should color the
brackets too but that would be too much work.
Diffstat (limited to '')
-rw-r--r--handle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/handle.c b/handle.c
index 0db7fd9..ce56a51 100644
--- a/handle.c
+++ b/handle.c
@@ -510,11 +510,11 @@ static const char *colorMentions(size_t id, struct Message *msg) {
 	if (!str) err(EX_OSERR, "fmemopen");
 
 	while (*mention) {
-		size_t skip = strspn(mention, ", ");
+		size_t skip = strspn(mention, ",<> ");
 		fwrite(mention, skip, 1, str);
 		mention += skip;
 
-		size_t len = strcspn(mention, ", ");
+		size_t len = strcspn(mention, ",<> ");
 		char punct = mention[len];
 		mention[len] = '\0';
 		fprintf(str, "\3%02d%s\3", completeColor(id, mention), mention);
colspan='3' class='logmsg'> The for loop was overriding zsh's $path variable, causing it to not be able to find rm. 2017-05-01Clean up SSH configJune McEnroe 2017-05-01Rename colorscheme "trivial"June McEnroe 2017-05-01Update vendored pathogenJune McEnroe 2017-05-01Clean up git configJune McEnroe 2017-05-01Clean up style in xxJune McEnroe 2017-05-01Clean up style in pbdJune McEnroe 2017-05-01Use EX_OK in pbcopyJune McEnroe 2017-04-30Clean up clockJune McEnroe 2017-04-30Clean up error strings in briJune McEnroe 2017-03-18Add -u option to xxJune McEnroe 2017-03-15Fix non-string-literal-format-string in briJune McEnroe 2017-03-15Fix bri compilationJune McEnroe cc will remove the file itself just fine. Always exit in case any of the shell commands fail. 2017-03-15Use psvar for title settingJune McEnroe Prevents prompt expansion from happening on the command being run when it is set in the title. 2017-03-14Add bri brightness control scriptJune McEnroe This is probably terrible. 2017-03-14Add comment to tmux terminal overrideJune McEnroe 2017-03-13Have tmux set block cursor on linux consoleJune McEnroe 2017-03-13Use inverse for Visual in colorschemeJune McEnroe