diff --git a/input.go b/input.go index 58951ae..4dced84 100644 --- a/input.go +++ b/input.go @@ -232,3 +232,13 @@ func (t *Terminal) typeCursorKey(key fyne.KeyName) { _, _ = t.in.Write([]byte{asciiEscape, cursorPrefix, 'C'}) } } + +type discardWriter struct{} + +func (d discardWriter) Write(p []byte) (n int, err error) { + return len(p), nil +} + +func (d discardWriter) Close() error { + return nil +} diff --git a/term.go b/term.go index 227665e..cdcc963 100644 --- a/term.go +++ b/term.go @@ -465,6 +465,7 @@ func New() *Terminal { t := &Terminal{ mouseCursor: desktop.DefaultCursor, highlightBitMask: 0x55, + in: discardWriter{}, } t.ExtendBaseWidget(t) t.content = widget2.NewTermGrid()