diff --git a/view.go b/view.go index 87f61eeb..0d0b19ef 100644 --- a/view.go +++ b/view.go @@ -1728,10 +1728,12 @@ func (v *View) OverwriteLines(y int, content string) { } // only call this function if you don't care where v.wx and v.wy end up -func (v *View) OverwriteLinesAndClearEverythingElse(y int, content string) { +func (v *View) OverwriteLinesAndClearEverythingElse(lineCount int, y int, content string) { v.writeMutex.Lock() defer v.writeMutex.Unlock() + v.setContentLineCount(lineCount) + v.overwriteLines(y, content) for i := 0; i < y; i += 1 { @@ -1743,7 +1745,7 @@ func (v *View) OverwriteLinesAndClearEverythingElse(y int, content string) { } } -func (v *View) SetContentLineCount(lineCount int) { +func (v *View) setContentLineCount(lineCount int) { if lineCount > 0 { v.makeWriteable(0, lineCount-1) }