aboutsummaryrefslogtreecommitdiff
path: root/layout.c
diff options
context:
space:
mode:
authorRiley Beckett <rbeckettvt@gmail.com>2025-10-31 16:20:28 -0400
committerJack Jamison <jackqjamison@gmail.com>2025-11-06 19:45:03 -0500
commit4ce78657afd8850a9c838444f646043e3dba370d (patch)
tree98db9b49d2cc1fb22cd398dae6a377ccc3d34471 /layout.c
parentbe810b73641073c12c0fcfb273508c235eca4b65 (diff)
fix things begin displayed when filtered size = 0
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/layout.c b/layout.c
index d9051cd..76ee1a5 100644
--- a/layout.c
+++ b/layout.c
@@ -4,7 +4,7 @@
void calculate_layout(client_state* state, rect_t* prompt, rect_t* input, rect_t* options, bool recalc_options, bool recalc_pages) {
if (state->prompt && *state->prompt) {
-
+
*prompt = (rect_t){ .x = 0, .y = state->line_height * state->lines, .dx = state->prompt_text_buffer.pixel_len + state->horizontal_spacing, .dy = state->line_height };
}
else {
@@ -150,6 +150,10 @@ void calculate_layout(client_state* state, rect_t* prompt, rect_t* input, rect_t
display->r.x += state->scroll_offset;
}
}
- }
+ }
+ else {
+ state->displayed_item_start = 0;
+ state->displayed_item_end = 0;
+ }
}
}