Propertly fill window with background color

Close #805
This commit is contained in:
Junegunn Choi committed 2017-01-16 12:27:32 +09:00
1 parent f96173cbe4
commit 8e2e63f9b9
2 files changed
+9

No files matched your search

+5
View File
@@ -558,6 +558,11 @@ func (t *Terminal) resizeWindows() {
width,
height, false)
}
if !t.tui.IsOptimized() && t.theme != nil && t.theme.HasBg() {
for i := 0; i < t.window.Height(); i++ {
t.window.MoveAndClear(i, 0)
}
}
}
func (t *Terminal) move(y int, x int, clear bool) {
+4
View File
@@ -175,6 +175,10 @@ type ColorTheme struct {
Border Color
}
func (t *ColorTheme) HasBg() bool {
return t.Bg != colDefault
}
type Event struct {
Type int
Char rune