From: Joseph Nuthalapati Date: Thu, 14 May 2020 12:25:44 +0000 (+0530) Subject: Fix bug with paginated result selection X-Git-Tag: 0.2.2~1 X-Git-Url: http://njoseph.me/gitweb/nimcoon.git/commitdiff_plain/db34bbff88d4c8e222a92c905908f25027428ddf Fix bug with paginated result selection Signed-off-by: Joseph Nuthalapati --- diff --git a/src/lib.nim b/src/lib.nim index 3f3bb68..d77cbe1 100644 --- a/src/lib.nim +++ b/src/lib.nim @@ -155,7 +155,8 @@ proc present*(searchResults: SearchResults, options: Table[string, bool], select of "q": quit(0) else: - handleUserInput(searchResults[parseInt(userInput)], options, player) + let searchResult = searchResults[selectionRange.begin .. selectionRange.until][parseInt(userInput)] + handleUserInput(searchResult, options, player) if options["feelingLucky"]: quit(0) else: