diff options
Diffstat (limited to 'stdoutShow.go')
| -rw-r--r-- | stdoutShow.go | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/stdoutShow.go b/stdoutShow.go index 2c9cd58..a17ef2f 100644 --- a/stdoutShow.go +++ b/stdoutShow.go @@ -163,6 +163,7 @@ func (w *guiWidget) Write(p []byte) (n int, err error) { return len(p), nil } if tk.v == nil { + // redo this old code v, _ := me.baseGui.View("msg") if v != nil { // fmt.Fprintln(outf, "found msg") @@ -171,35 +172,6 @@ func (w *guiWidget) Write(p []byte) (n int, err error) { return len(p), nil } tk.refreshStdout() - /* - // optionally write the output to /tmp - s := fmt.Sprint(string(p)) - s = strings.TrimSuffix(s, "\n") - fmt.Fprintln(outf, s) - v, _ := me.baseGui.View("msg") - if v != nil { - // fmt.Fprintln(outf, "found msg") - tk.v = v - } - } else { - // display the output in the gocui window - var cur []string - // chop off the last lines in the buffer - chop := len(me.stdout.outputS) - (me.stdout.h - 1) - if chop < 0 { - chop = 0 - } - if len(me.stdout.outputS) > chop { - cur = append(cur, me.stdout.outputS[chop:]...) - } else { - cur = append(cur, me.stdout.outputS...) - } - slices.Reverse(cur) - tk.v.Clear() - fmt.Fprintln(tk.v, strings.Join(cur, "\n")) - } - */ - return len(p), nil } |
