feat: LineCount method for counting number of lines in textarea

This commit is contained in:
Maas Lalani 2022-08-05 13:54:41 -04:00
parent 47eee84147
commit e200bf8c81

View File

@ -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