From 445351c09a8f9647bec82a5e173815a0642bb2ea Mon Sep 17 00:00:00 2001 From: speedie Date: Sun, 7 May 2023 14:11:57 +0200 Subject: [PATCH] better if a key doesn't have to be pressed --- libs/event.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libs/event.c b/libs/event.c index e41b1e3..863356c 100644 --- a/libs/event.c +++ b/libs/event.c @@ -32,15 +32,6 @@ void eventloop(void) { grabfocus(); break; case KeyPress: // read key array and call functions - if (listfile) { - readfile(); - - if (listchanged) { - match(); - drawmenu(); - } - } - if (incremental) { puts(text); fflush(stdout); @@ -62,6 +53,15 @@ void eventloop(void) { break; } + if (listfile) { + readfile(); + + if (listchanged) { + match(); + drawmenu(); + } + } + // redraw image on X11 event #if USEIMAGE if (!noimg) {