diff options
Diffstat (limited to 'lib/ui')
-rw-r--r-- | lib/ui/textinput.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ui/textinput.go b/lib/ui/textinput.go index 39351735..e81e8361 100644 --- a/lib/ui/textinput.go +++ b/lib/ui/textinput.go @@ -63,9 +63,10 @@ func (ti *TextInput) StringRight() string { return string(ti.text[ti.index:]) } -func (ti *TextInput) Set(value string) { +func (ti *TextInput) Set(value string) *TextInput { ti.text = []rune(value) ti.index = len(ti.text) + return ti } func (ti *TextInput) Invalidate() { |