aboutsummaryrefslogtreecommitdiff
path: root/keybind.c
diff options
context:
space:
mode:
Diffstat (limited to 'keybind.c')
-rw-r--r--keybind.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/keybind.c b/keybind.c
index c9b875a..17baad1 100644
--- a/keybind.c
+++ b/keybind.c
@@ -1,6 +1,7 @@
#include "keybind.h"
#include "array.h"
#include "input_field.h"
+#include "layout.h"
key_repeat_t quit(client_state* state) {
state->running = false;
@@ -40,7 +41,8 @@ key_repeat_t insert_selected(client_state* state) {
key_repeat_t select_next(client_state* state) {
if (state->selected_filtered_item != -1) {
state->selected_filtered_item = MIN(state->selected_filtered_item + 1, (int)array_size(state->filtered_items) - 1);
- update_layout(state);
+ rect_t prompt, input, options;
+ calculate_layout(state, &prompt, &input, &options, true, false);
}
return KEY_REPEAT;
}
@@ -48,7 +50,8 @@ key_repeat_t select_next(client_state* state) {
key_repeat_t select_previous(client_state* state) {
if (state->selected_filtered_item != -1) {
state->selected_filtered_item = MAX(state->selected_filtered_item - 1, 0);
- update_layout(state);
+ rect_t prompt, input, options;
+ calculate_layout(state, &prompt, &input, &options, true, false);
}
return KEY_REPEAT;
}