Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions view.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
}
Expand Down