Description: Use Screen.Clear to reduce flicker
Author: Joe Lim
Origin: upstream
Forwarded: not-needed
Applied-Upstream: https://github.com/gokcehan/lf/commit/3d5a418c6c21d1004019f2c1730895164d6d7d5d
Reviewed-by: Nick Morrott <nickm@debian.org>
Last-Update: 2025-05-05
---
--- a/ui.go
+++ b/ui.go
@@ -1019,13 +1019,7 @@
 	st := tcell.StyleDefault
 	context := dirContext{selections: nav.selections, saves: nav.saves, tags: nav.tags}
 
-	// XXX: manual clean without flush to avoid flicker on Windows
-	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.sxScreen.sixel = nil
 
 	ui.drawPromptLine(nav)
