From ebae91b44da5fdc6b28e2af3ccf714918e97eb31 Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Mon, 20 Apr 2020 21:55:31 +0530 Subject: [PATCH] pagination: Fix minor regression Signed-off-by: Joseph Nuthalapati --- src/lib.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.nim b/src/lib.nim index 3d3f515..3f3bb68 100644 --- a/src/lib.nim +++ b/src/lib.nim @@ -144,10 +144,14 @@ proc present*(searchResults: SearchResults, options: Table[string, bool], select if selectionRange.until + 1 < len(searchResults): let newSelectionRange = (selectionRange.until + 1, min(len(searchResults) - 1, selectionRange.until + limit)) present(searchResults, options, newSelectionRange, player) + else: + present(searchResults, options, selectionRange, player) of "p": if selectionRange.begin > 0: let newSelectionRange = (selectionRange.begin - limit, selectionRange.until - limit) present(searchResults, options, newSelectionRange, player) + else: + present(searchResults, options, selectionRange, player) of "q": quit(0) else: -- 2.43.0