Skip to content

Commit

Permalink
Add Blink method to textinput to return blink state
Browse files Browse the repository at this point in the history
  • Loading branch information
aschey authored and meowgorithm committed Mar 1, 2022
1 parent 64b9e05 commit e349920
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions textinput/textinput.go
Expand Up @@ -203,6 +203,11 @@ func (m Model) Cursor() int {
return m.pos
}

// Blink returns whether or not to draw the cursor.
func (m Model) Blink() bool {
return m.blink
}

// SetCursor moves the cursor to the given position. If the position is
// out of bounds the cursor will be moved to the start or end accordingly.
func (m *Model) SetCursor(pos int) {
Expand Down

0 comments on commit e349920

Please sign in to comment.