forked from Mirrors/bubbletea
Render scroll area before other stuff when resizing
This commit is contained in:
parent
468b98d2eb
commit
bbcdb3ac1f
10
renderer.go
10
renderer.go
|
@ -253,16 +253,16 @@ func (r *renderer) handleMessages(msg Msg) {
|
||||||
r.clearIgnoredLines()
|
r.clearIgnoredLines()
|
||||||
|
|
||||||
case syncScrollAreaMsg:
|
case syncScrollAreaMsg:
|
||||||
// Clear buffer to force non-scrolling stuff to repaint
|
|
||||||
r.mtx.Lock()
|
|
||||||
r.buf.Reset()
|
|
||||||
r.mtx.Unlock()
|
|
||||||
|
|
||||||
// Re-render scrolling area
|
// Re-render scrolling area
|
||||||
r.clearIgnoredLines()
|
r.clearIgnoredLines()
|
||||||
r.setIgnoredLines(msg.topBoundary, msg.bottomBoundary)
|
r.setIgnoredLines(msg.topBoundary, msg.bottomBoundary)
|
||||||
r.insertTop(msg.lines, msg.topBoundary, msg.bottomBoundary)
|
r.insertTop(msg.lines, msg.topBoundary, msg.bottomBoundary)
|
||||||
|
|
||||||
|
// Clear buffer to force non-scrolling stuff to repaint
|
||||||
|
r.mtx.Lock()
|
||||||
|
r.buf.Reset()
|
||||||
|
r.mtx.Unlock()
|
||||||
|
|
||||||
case scrollUpMsg:
|
case scrollUpMsg:
|
||||||
r.insertTop(msg.lines, msg.topBoundary, msg.bottomBoundary)
|
r.insertTop(msg.lines, msg.topBoundary, msg.bottomBoundary)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue