diff --git a/view.go b/view.go index 9d6553cb..5355d6b2 100644 --- a/view.go +++ b/view.go @@ -421,7 +421,11 @@ func (v *View) realPosition(vx, vy int) (x, y int, err error) { // Clear empties the view's internal buffer. func (v *View) Clear() { + v.writeMutex.Lock() + defer v.writeMutex.Unlock() + v.tainted = true + v.ei.reset() v.lines = nil v.viewLines = nil