diff options
author | Phil Jones <philj56@gmail.com> | 2023-04-09 18:26:52 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2023-04-09 18:26:52 +0100 |
commit | cfab8efa406c7ff1063cb6ef89cb41028d0e826e (patch) | |
tree | 35f5931295bcd430189002fc68abf1acdc03bf9c /src/input.c | |
parent | 0fe8548a6534a80aa81c288629799a752f0060c2 (diff) |
Add --auto-accept-single option.
Diffstat (limited to 'src/input.c')
-rw-r--r-- | src/input.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |