diff --git a/textarea/textarea.go b/textarea/textarea.go index 6cdbffe..c704005 100644 --- a/textarea/textarea.go +++ b/textarea/textarea.go @@ -289,6 +289,11 @@ func (m *Model) Length() int { return l + len(m.value) - 1 } +// LineCount returns the number of lines that are currently in the text input. +func (m *Model) LineCount() int { + return len(m.value) +} + // Line returns the line position. func (m Model) Line() int { return m.row