diff --git a/pkg/gocui/view.go b/pkg/gocui/view.go index 42a087dce..060079f50 100644 --- a/pkg/gocui/view.go +++ b/pkg/gocui/view.go @@ -2063,6 +2063,9 @@ func (v *View) ViewBufferLines() []string { // LinesHeight is the count of view lines (i.e. lines excluding wrapping) func (v *View) LinesHeight() int { + v.writeMutex.Lock() + defer v.writeMutex.Unlock() + return len(v.buf.lines) }