diff --git a/textview.go b/textview.go index f8035c50..95622f3b 100644 --- a/textview.go +++ b/textview.go @@ -233,6 +233,11 @@ func (t *TextView) SetCursorIndex(i int) { t.cursorIndex = i } +// GetCursor returns cursor position. +func (t *TextView) GetCursorIndex() int { + return t.cursorIndex +} + // SetHighlightColor sets the region highlight color. func (t *TextView) SetHighlightColor(c tcell.Color) { t.highlightColor = c