From 4ce78657afd8850a9c838444f646043e3dba370d Mon Sep 17 00:00:00 2001 From: Riley Beckett Date: Fri, 31 Oct 2025 16:20:28 -0400 Subject: fix things begin displayed when filtered size = 0 --- layout.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'layout.c') 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; + } } } -- cgit v1.2.3