mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-05 04:36:07 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user