summaryrefslogtreecommitdiff
path: root/src/tui/light.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/tui/light.go')
-rw-r--r--src/tui/light.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tui/light.go b/src/tui/light.go
index 0546caa8..20b7b9d5 100644
--- a/src/tui/light.go
+++ b/src/tui/light.go
@@ -189,6 +189,10 @@ func (r *LightRenderer) Init() {
}
}
+func (r *LightRenderer) Resize(maxHeightFunc func(int) int) {
+ r.maxHeightFunc = maxHeightFunc
+}
+
func (r *LightRenderer) makeSpace() {
r.stderr("\n")
r.csi("G")
@@ -676,6 +680,9 @@ func (r *LightRenderer) MaxX() int {
}
func (r *LightRenderer) MaxY() int {
+ if r.height == 0 {
+ r.updateTerminalSize()
+ }
return r.height
}