Fixed dmenu caching

This commit is contained in:
Scoopta 2019-08-28 22:21:43 -07:00
parent 389cb8e299
commit 5afa0de598

View File

@ -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 {