diff options
Diffstat (limited to 'tui/text_input.go')
| -rw-r--r-- | tui/text_input.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tui/text_input.go b/tui/text_input.go new file mode 100644 index 0000000..a8c7d6d --- /dev/null +++ b/tui/text_input.go @@ -0,0 +1,15 @@ +package tui + +import ( +// "github.com/rivo/uniseg" +// "strings" +) + +type TextInput struct { + Contents string + Cursor int +} + +func (t *TextInput) Update(ev Event) { + t.Cursor = max(t.Cursor, 0) +} |
