diff options
author | June McEnroe <june@causal.agency> | 2022-07-30 19:21:37 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2022-07-30 19:21:37 -0400 |
commit | be6052e9a933b4b792f65f50ea009bb68a3f5e93 (patch) | |
tree | 40fd4b672466a6e1fad7e8aab23bbe01452cb06c | |
parent | Rename cache{Prefix,Substr} to cache{Complete,Search} (diff) | |
download | catgirl-be6052e9a933b4b792f65f50ea009bb68a3f5e93.tar.gz catgirl-be6052e9a933b4b792f65f50ea009bb68a3f5e93.zip |
Only set cache color if not Default
Diffstat (limited to '')
-rw-r--r-- | cache.c | 3 |
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) { |