From: Joseph Nuthalapati Date: Thu, 20 Feb 2020 20:38:00 +0000 (+0530) Subject: Wipe screen on each redisplay of search results X-Git-Tag: 0.1.0~8 X-Git-Url: https://njoseph.me/gitweb/nimcoon.git/commitdiff_plain/17955bba9f852c8264f1bfdf8259f19d4aeefd2a?hp=427e87f9d63a2514a8f31ba915e934fcab8399a2 Wipe screen on each redisplay of search results Signed-off-by: Joseph Nuthalapati --- diff --git a/src/lib.nim b/src/lib.nim index 53c2e5d..c737f02 100644 --- a/src/lib.nim +++ b/src/lib.nim @@ -40,7 +40,7 @@ func extractTitlesAndUrls*(html: string): seq[SearchResult] = map(a => (a.attrs["title"], "https://www.youtube.com" & a.attrs["href"])) proc presentVideoOptions*(searchResults: seq[SearchResult]) = - echo "" + eraseScreen() for index, (title, url) in searchResults: styledEcho $index, ". ", styleBright, fgMagenta, title, "\n", resetStyle, fgCyan, url, "\n"