From 1833e1c8152fc1b16866a0b39f146b5e20464f95 Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Fri, 12 May 2023 16:37:31 +0200 Subject: [PATCH] Fix initial background clear. --- crt.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crt.go b/crt.go index da01b1b..4970f23 100644 --- a/crt.go +++ b/crt.go @@ -98,6 +98,7 @@ func NewGame(width int, height int, fonts Fonts, tty io.Reader, adapter InputAda }) game.ResetSGR() + game.RecalculateBackgrounds() return game, nil } @@ -279,6 +280,7 @@ func (g *Window) parseSequences(str string, printExtra bool) int { return lastFound } +// RecalculateBackgrounds syncs the background colors to the background pixels. func (g *Window) RecalculateBackgrounds() { for i := 0; i < g.cellsWidth; i++ { for j := 0; j < g.cellsHeight; j++ {