diff options
author | Hubert Hirtz <hubert.hirtz@laposte.net> | 2020-06-03 19:03:58 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert.hirtz@laposte.net> | 2020-06-03 19:03:58 +0200 |
commit | 9a732d4de4d1e82fadd5270837201819d78adb62 (patch) | |
tree | 851d91be3c3147e19a52e500a2d6189f40eaaa00 /ui/ui.go | |
parent | Initial commit (diff) |
Part Join Typing
Diffstat (limited to 'ui/ui.go')
-rw-r--r-- | ui/ui.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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++ |