summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stdoutShow.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/stdoutShow.go b/stdoutShow.go
index 38fc837..75a4ae5 100644
--- a/stdoutShow.go
+++ b/stdoutShow.go
@@ -166,6 +166,11 @@ func (w stdout) Write(p []byte) (n int, err error) {
}
func (w *guiWidget) Write(p []byte) (n int, err error) {
+ if w == nil {
+ lines := strings.Split(strings.TrimSpace(string(p)), "\n")
+ me.stdout.outputS = append(me.stdout.outputS, lines...)
+ return len(p), nil
+ }
w.tainted = true
me.writeMutex.Lock()
defer me.writeMutex.Unlock()