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:
parent
be7995369c
commit
95f5fe8fc9
@ -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,
|
||||
}
|
||||
|
@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user