From 17955bba9f852c8264f1bfdf8259f19d4aeefd2a Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Fri, 21 Feb 2020 02:08:00 +0530 Subject: [PATCH] Wipe screen on each redisplay of search results Signed-off-by: Joseph Nuthalapati --- src/lib.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" -- 2.43.0