diff --git a/textinput/textinput.go b/textinput/textinput.go index 1d0a6fe..8fb9e70 100644 --- a/textinput/textinput.go +++ b/textinput/textinput.go @@ -139,7 +139,7 @@ func (m *Model) SetValue(s string) { } else { m.value = runes } - if m.pos > len(m.value) { + if m.pos == 0 || m.pos > len(m.value) { m.SetCursor(len(m.value)) } m.handleOverflow()