X-Git-Url: https://njoseph.me/gitweb/nimcoon.git/blobdiff_plain/2a97409a93fad6c907239211eb5730e73f9b1183..ebae91b44da5fdc6b28e2af3ccf714918e97eb31:/src/lib.nim 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: