forked from Mirrors/bubbletea
Force a full repaint when resizing the window
v0.13.4 introduced a regression where lines weren't always cleared when resizing the window resulting in the presence of rendering artifacts. This commit fixes that.
This commit is contained in:
parent
29b7de4b7c
commit
3256fae4d4
|
@ -5,5 +5,6 @@ type nilRenderer struct{}
|
|||
func (n nilRenderer) start() {}
|
||||
func (n nilRenderer) stop() {}
|
||||
func (n nilRenderer) write(v string) {}
|
||||
func (n nilRenderer) repaint() {}
|
||||
func (n nilRenderer) altScreen() bool { return false }
|
||||
func (n nilRenderer) setAltScreen(v bool) {}
|
||||
|
|
|
@ -5,6 +5,7 @@ type renderer interface {
|
|||
start()
|
||||
stop()
|
||||
write(string)
|
||||
repaint()
|
||||
altScreen() bool
|
||||
setAltScreen(bool)
|
||||
}
|
||||
|
|
|
@ -202,6 +202,10 @@ func (r *standardRenderer) write(s string) {
|
|||
_, _ = r.buf.WriteString(s)
|
||||
}
|
||||
|
||||
func (r *standardRenderer) repaint() {
|
||||
r.lastRender = ""
|
||||
}
|
||||
|
||||
func (r *standardRenderer) altScreen() bool {
|
||||
return r.altScreenActive
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue