From cfab8efa406c7ff1063cb6ef89cb41028d0e826e Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Sun, 9 Apr 2023 18:26:52 +0100 Subject: Add --auto-accept-single option. --- src/input.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/input.c') diff --git a/src/input.c b/src/input.c index 0ccdead..1049fa9 100644 --- a/src/input.c +++ b/src/input.c @@ -110,6 +110,10 @@ void input_handle_keypress(struct tofi *tofi, xkb_keycode_t keycode) return; } + if (tofi->auto_accept_single && tofi->window.entry.results.count == 1) { + tofi->submit = true; + } + tofi->window.surface.redraw = true; } -- cgit v1.2.3