From 5d564df07976d2ddcb57977513939af5af73eda2 Mon Sep 17 00:00:00 2001 From: Joe Lim <50560759+joelim-work@users.noreply.github.com> Date: Wed, 22 Mar 2023 00:18:26 +1100 Subject: [PATCH] Use builtin `Clear` function for screen clearing --- ui.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ui.go b/ui.go index 09188cfc..9f993c49 100644 --- a/ui.go +++ b/ui.go @@ -910,12 +910,7 @@ func (ui *ui) draw(nav *nav) { st := tcell.StyleDefault context := dirContext{selections: nav.selections, saves: nav.saves, tags: nav.tags} - wtot, htot := ui.screen.Size() - for i := 0; i < wtot; i++ { - for j := 0; j < htot; j++ { - ui.screen.SetContent(i, j, ' ', nil, st) - } - } + ui.screen.Clear() ui.drawPromptLine(nav)