about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-07-30 19:21:37 -0400
committerJune McEnroe <june@causal.agency>2022-07-30 19:21:37 -0400
commitbe6052e9a933b4b792f65f50ea009bb68a3f5e93 (patch)
tree40fd4b672466a6e1fad7e8aab23bbe01452cb06c
parentRename cache{Prefix,Substr} to cache{Complete,Search} (diff)
downloadcatgirl-be6052e9a933b4b792f65f50ea009bb68a3f5e93.tar.gz
catgirl-be6052e9a933b4b792f65f50ea009bb68a3f5e93.zip
Only set cache color if not Default
-rw-r--r--cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cache.c b/cache.c
index fe2f2a4..a125944 100644
--- a/cache.c
+++ b/cache.c
@@ -110,7 +110,8 @@ void cacheInsert(bool touch, uint id, const char *key) {
 }
 
 void cacheInsertColor(bool touch, uint id, const char *key, enum Color color) {
-	insert(touch, id, key)->color = color;
+	struct Node *node = insert(touch, id, key);
+	if (color != Default) node->color = color;
 }
 
 void cacheReplace(bool touch, const char *old, const char *new) {
:'s in the tag name. 2021-01-19Prefer tag matches not preceded by [[:alnum:]]June McEnroe Otherwise the "id" in "void" matches for "void id". 2021-01-19Escape \ and / in mtags search patternsJune McEnroe 2021-01-20Use mtags in source-filterJune McEnroe 2021-01-19Add mtags to generate tags for make and mdocJune McEnroe 2021-01-19Map tags to IDs using only [[:alnum:]-._]June McEnroe 2021-01-19Don't use a pager if reading standard inputJune McEnroe 2021-01-19Support BSD make syntax and match *.amJune McEnroe These don't really go together, but... 2021-01-19Match tab following escaped newline in make assignmentsJune McEnroe Otherwise it ends up going into Shell state. 2021-01-18Allow matching lexers using first input lineJune McEnroe