From 5afa0de5983d4ac85091e08bab6c02eaef44d51b Mon Sep 17 00:00:00 2001 From: Scoopta Date: Wed, 28 Aug 2019 22:21:43 -0700 Subject: [PATCH] Fixed dmenu caching --- src/wofi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/wofi.c b/src/wofi.c index 7e9674f..23537d1 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -217,8 +217,11 @@ static struct map* load_cache(char* mode) { struct wl_list* cache = read_cache(mode); struct cache_line* node, *tmp; wl_list_for_each_reverse_safe(node, tmp, cache, link) { - char* text = strrchr(node->line, '/'); - char* action = strchr(node->line, ' ') + 1; + char* text = NULL; + char* action = action = strchr(node->line, ' ') + 1; + if(strcmp(mode, "run") == 0) { + text = strrchr(node->line, '/'); + } if(text == NULL) { text = action; } else {