From 2a297fabad3b80d662f1244221ddc11c5ba33562 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Fri, 19 Jun 2020 11:05:19 -0400 Subject: [PATCH] Also repaint non-scrolling stuff when resizing --- renderer.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/renderer.go b/renderer.go index fad8938..54c9a60 100644 --- a/renderer.go +++ b/renderer.go @@ -253,6 +253,12 @@ func (r *renderer) handleMessages(msg Msg) { r.clearIgnoredLines() case syncScrollAreaMsg: + // Clear buffer to force non-scrolling stuff to repaint + r.mtx.Lock() + r.buf.Reset() + r.mtx.Unlock() + + // Re-render scrolling area r.clearIgnoredLines() r.setIgnoredLines(msg.topBoundary, msg.bottomBoundary) r.insertTop(msg.lines, msg.topBoundary, msg.bottomBoundary)