diff options
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++ |