diff --git a/standard_renderer.go b/standard_renderer.go index bdaf977..2c8a8ee 100644 --- a/standard_renderer.go +++ b/standard_renderer.go @@ -292,8 +292,10 @@ func (r *standardRenderer) insertBottom(lines []string, topBoundary, bottomBound func (r *standardRenderer) handleMessages(msg Msg) { switch msg := msg.(type) { case WindowSizeMsg: + r.mtx.Lock() r.width = msg.Width r.height = msg.Height + r.mtx.Unlock() case clearScrollAreaMsg: r.clearIgnoredLines()