From 4961fdf75ead42902d13e847356bf8c554d0a9c9 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Fri, 3 Feb 2023 16:21:26 -0500 Subject: Flatten cache structs --- command.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'command.c') 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; } -- cgit 1.4.1