From 2917c3801e73d69d4e18b1be2164dd0f63378577 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 3 Dec 2023 13:40:20 -0800 Subject: [PATCH] =?UTF-8?q?fixes=20#647=20Screen.Clear=20=E2=80=94=20Flick?= =?UTF-8?q?ering=20on=20Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- console_win.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/console_win.go b/console_win.go index 55b4b55..db4bb91 100644 --- a/console_win.go +++ b/console_win.go @@ -38,7 +38,6 @@ type cScreen struct { curx int cury int style Style - clear bool fini bool vten bool truecolor bool @@ -972,11 +971,6 @@ func (s *cScreen) writeString(x, y int, style Style, ch []uint16) { func (s *cScreen) draw() { // allocate a scratch line bit enough for no combining chars. // if you have combining characters, you may pay for extra allocations. - if s.clear { - s.clearScreen(s.style, s.vten) - s.clear = false - s.cells.Invalidate() - } buf := make([]uint16, 0, s.w) wcs := buf[:] lstyle := styleInvalid @@ -1165,12 +1159,7 @@ func (s *cScreen) Clear() { } func (s *cScreen) Fill(r rune, style Style) { - s.Lock() - if !s.fini { - s.cells.Fill(r, style) - s.clear = true - } - s.Unlock() + s.cells.Fill(r, style) } func (s *cScreen) clearScreen(style Style, vtEnable bool) {