diff options
-rw-r--r-- | lib/ui/textinput.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ui/textinput.go b/lib/ui/textinput.go index f09ebb43..9d1de963 100644 --- a/lib/ui/textinput.go +++ b/lib/ui/textinput.go @@ -70,8 +70,8 @@ func (ti *TextInput) String() string { } func (ti *TextInput) StringLeft() string { - for ti.index >= len(ti.text) { - ti.index = len(ti.text) - 1 + for ti.index > len(ti.text) { + ti.index = len(ti.text) } return string(ti.text[:ti.index]) } |