summaryrefslogtreecommitdiff
path: root/ui/ui.go
diff options
context:
space:
mode:
authorHubert Hirtz <hubert.hirtz@laposte.net>2020-06-03 19:03:58 +0200
committerHubert Hirtz <hubert.hirtz@laposte.net>2020-06-03 19:03:58 +0200
commit9a732d4de4d1e82fadd5270837201819d78adb62 (patch)
tree851d91be3c3147e19a52e500a2d6189f40eaaa00 /ui/ui.go
parentInitial commit (diff)
Part Join Typing
Diffstat (limited to 'ui/ui.go')
-rw-r--r--ui/ui.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 7bdf4a7..04d3f25 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -34,7 +34,7 @@ func New() (ui *UI, err error) {
ui.screen.Clear()
ui.screen.ShowCursor(0, h-2)
- ui.Events = make(chan tcell.Event)
+ ui.Events = make(chan tcell.Event, 128)
go func() {
for !ui.ShouldExit() {
ui.Events <- ui.screen.PollEvent()
@@ -125,6 +125,10 @@ func (ui *UI) AddLine(buffer string, line string, t time.Time) {
}
}
+func (ui *UI) Input() string {
+ return string(ui.textInput)
+}
+
func (ui *UI) InputRune(r rune) {
ui.textInput = append(ui.textInput, r)
ui.textCursor++