feat(v2/textarea): expose Column(), clarify 0-indexing (#875)

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker
2026-01-09 08:28:49 -03:00
committed by GitHub
parent 93a004ab70
commit ae99f46cec
+6 -1
View File
@@ -595,11 +595,16 @@ func (m *Model) LineCount() int {
return len(m.value)
}
// Line returns the row position of the cursor.
// Line returns the 0-indexed row position of the cursor.
func (m Model) Line() int {
return m.row
}
// Column returns the 0-indexed column position of the cursor.
func (m Model) Column() int {
return m.col
}
// ScrollYOffset returns the Y offset (top row) index of the current view, which
// can be used to calculate the current scroll position.
func (m Model) ScrollYOffset() int {