diff options
author | Phil Jones <philj56@gmail.com> | 2022-08-04 09:57:53 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2022-08-04 09:57:53 +0100 |
commit | 15f831bbb6f27d5a11879dd07f383400e83c97e3 (patch) | |
tree | 94b43f3236069c42cdd76cc58ba8d65ae589c5e6 /src/entry.h | |
parent | c0d3df8af0328280836ccfef85ae7e40eb3b6b87 (diff) |
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.
Diffstat (limited to 'src/entry.h')
-rw-r--r-- | src/entry.h | 3 |
1 files changed, 2 insertions, 1 deletions
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]; |