aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ui/textinput.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ui/textinput.go b/lib/ui/textinput.go
index 3935173..e81e836 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() {