forked from Mirrors/bubbletea
Add lock for updating width and height
This commit is contained in:
parent
ab65f2391f
commit
1ee40507ef
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue