mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-23 14:22:58 +03:00
feat: LineCount method for counting number of lines in textarea
This commit is contained in:
parent
47eee84147
commit
e200bf8c81
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user