pagination: Fix minor regression
authorJoseph Nuthalapati <njoseph@riseup.net>
Mon, 20 Apr 2020 16:25:31 +0000 (21:55 +0530)
committerJoseph Nuthalapati <njoseph@riseup.net>
Mon, 20 Apr 2020 16:25:31 +0000 (21:55 +0530)
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
src/lib.nim

index 3d3f51589d26a7fb56034d2f7975569a0dc75796..3f3bb686552b21b70d22426d3b7b1df5e65d77e6 100644 (file)
@@ -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: