From 15f831bbb6f27d5a11879dd07f383400e83c97e3 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Thu, 4 Aug 2022 09:57:53 +0100 Subject: Improve pagination. Pagination was broken in horizontal mode before, and in general tried to render too many results (leading to a cut-off last result). This commit fixes both of those, with the minor caveat that you can no longer scroll straight to the last result. --- src/entry.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/entry.h') diff --git a/src/entry.h b/src/entry.h index 5ee4cd6..45865af 100644 --- a/src/entry.h +++ b/src/entry.h @@ -34,7 +34,7 @@ struct entry { uint32_t input_mb_length; uint32_t selection; - uint32_t page; + uint32_t first_result; struct string_vec results; struct string_vec commands; struct desktop_vec apps; @@ -51,6 +51,7 @@ struct entry { bool horizontal; uint32_t num_results; uint32_t num_results_drawn; + uint32_t last_num_results_drawn; int32_t result_spacing; uint32_t font_size; char font_name[MAX_FONT_NAME_LENGTH]; -- cgit v1.2.3