diff options
author | June McEnroe <june@causal.agency> | 2023-02-03 16:21:26 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2023-02-03 16:21:26 -0500 |
commit | 4961fdf75ead42902d13e847356bf8c554d0a9c9 (patch) | |
tree | b858648f0d38ffcf7e077f651159e5e2f5974850 /command.c | |
parent | Handle missing LIST reply topic parameter (diff) | |
download | catgirl-4961fdf75ead42902d13e847356bf8c554d0a9c9.tar.gz catgirl-4961fdf75ead42902d13e847356bf8c554d0a9c9.zip |
Flatten cache structs
Diffstat (limited to '')
-rw-r--r-- | command.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/command.c b/command.c index 4fb58da..23b5e89 100644 --- a/command.c +++ b/command.c @@ -419,11 +419,10 @@ static void commandWindow(uint id, char *params) { windowShow(windowFor(id)); return; } - struct Cursor curs = {0}; - for (const char *match; (match = cacheSearch(&curs, None, params));) { - id = idFind(match); + for (struct Cursor curs = {0}; cacheSearch(&curs, None, params);) { + id = idFind(curs.entry->key); if (!id) continue; - cacheAccept(&curs); + cacheTouch(&curs); windowShow(windowFor(id)); break; } |