diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2025-10-18 01:17:11 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2025-10-18 01:17:11 -0400 |
| commit | b6db9c7c1b8e2cef958b892b067aa565f4c5e403 (patch) | |
| tree | 33b627bb0d2f0ae67812c74941f0649ad52fdf53 /input_field.c | |
| parent | 87338246fbf60e044f8aaba53032661c1796e0f9 (diff) | |
allow free result
Diffstat (limited to 'input_field.c')
| -rw-r--r-- | input_field.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/input_field.c b/input_field.c index 14aca1b..46f0791 100644 --- a/input_field.c +++ b/input_field.c @@ -105,7 +105,11 @@ bool type_key(client_state* state, xkb_keysym_t keysym) { void submit_line(client_state* state) { if (state->selected_filtered_item == -1) { - printf("%.*s\n", (int)array_size(state->input_buffer), state->input_buffer); + if (state->allow_free_result) { + printf("%.*s\n", (int)array_size(state->input_buffer), state->input_buffer); + } else { + return; + } } else { printf("%s\n", state->items[state->filtered_items[state->selected_filtered_item]].text); } |
