From 5609c4d006fbcbf71f3245621ba0132d0b8871d1 Mon Sep 17 00:00:00 2001 From: speedie Date: Sun, 9 Jul 2023 15:26:52 +0200 Subject: [PATCH] Improve incremental feature --- libs/x11/event.c | 5 ----- spmenu.c | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/x11/event.c b/libs/x11/event.c index ff11309..12baa50 100644 --- a/libs/x11/event.c +++ b/libs/x11/event.c @@ -27,11 +27,6 @@ void eventloop_x11(void) { grabfocus(); break; case KeyPress: // read key array and call functions - if (incremental) { - puts(tx.text); - fflush(stdout); - } - keypress_x11(&ev); break; case SelectionNotify: // paste selection diff --git a/spmenu.c b/spmenu.c index e102f46..eba95d0 100644 --- a/spmenu.c +++ b/spmenu.c @@ -458,6 +458,11 @@ void insert(const char *str, ssize_t n) { sp.cursor -= n; match(); } + + if (incremental) { + puts(tx.text); + fflush(stdout); + } } size_t nextrune(int inc) {