1
0
mirror of https://github.com/mum4k/termdash.git synced 2025-04-25 13:48:50 +08:00

Fix default clear style to use ColorDefault

This commit is contained in:
kvnxiao 2020-03-01 02:13:43 -05:00
parent be7995369c
commit 95f5fe8fc9
2 changed files with 5 additions and 5 deletions

View File

@ -51,7 +51,7 @@ func ColorMode(cm terminalapi.ColorMode) Option {
}
// ClearStyle sets the style to use for tcell when clearing the screen.
// Defaults to white foreground and black background.
// Defaults to ColorDefault for foreground and background.
func ClearStyle(fg, bg cell.Color) Option {
return option(func(t *Terminal) {
t.clearStyle = &cell.Options{
@ -91,8 +91,8 @@ func newTerminal(opts ...Option) (*Terminal, error) {
done: make(chan struct{}),
colorMode: DefaultColorMode,
clearStyle: &cell.Options{
FgColor: cell.ColorWhite,
BgColor: cell.ColorBlack,
FgColor: cell.ColorDefault,
BgColor: cell.ColorDefault,
},
screen: screen,
}

View File

@ -76,8 +76,8 @@ func TestNewTerminalClearStyle(t *testing.T) {
want: &Terminal{
colorMode: terminalapi.ColorMode256,
clearStyle: &cell.Options{
FgColor: cell.ColorWhite,
BgColor: cell.ColorBlack,
FgColor: cell.ColorDefault,
BgColor: cell.ColorDefault,
},
},
},