diff --git a/textarea/textarea.go b/textarea/textarea.go index fbe2b5e..7e4508a 100644 --- a/textarea/textarea.go +++ b/textarea/textarea.go @@ -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 {