From b5707af4b842f521104c5fba07e5685612ff91f2 Mon Sep 17 00:00:00 2001 From: C. McEnroe Date: Sat, 8 Feb 2020 00:58:17 -0500 Subject: Handle KICK See I knew the color cache in complete would be useful in at least one place! --- complete.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'complete.c') diff --git a/complete.c b/complete.c index c194536..2f5275f 100644 --- a/complete.c +++ b/complete.c @@ -90,6 +90,11 @@ void completeTouch(size_t id, const char *str, enum Color color) { prepend(node ? detach(node) : alloc(id, str, color)); } +enum Color completeColor(size_t id, const char *str) { + struct Node *node = find(id, str); + return (node ? node->color : Default); +} + static struct Node *match; const char *complete(size_t id, const char *prefix) { -- cgit 1.4.1-2-gfad0