Skip to content
Myr

Add method to text input model to reset the state

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Rocha · committed by Christian Rocha · parent 3868858 · Browse files · 1 file+7 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−0 removed

  • other:+7 added−0 removed

1 file+7 added−0 removed

modified:textinput/textinput.go+7 added
70 unmodified lines
71 m.focus = false72 m.blink = true73}7475// Reset sets the input to its default state with no input.76func (m *Model) Reset() {77 m.Value = ""78 m.offset = 079 m.pos = 080}8182// colorText colorizes a given string according to the TextColor value of the83// model84func (m *Model) colorText(s string) string {85 return termenv.
220 unmodified lines