summaryrefslogtreecommitdiff
path: root/stdoutShow.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-09 01:46:04 -0600
committerJeff Carr <[email protected]>2025-02-09 01:46:04 -0600
commiteba5ea8cc072e950df19ad5b97e3c99794ab790e (patch)
tree79c95a3c8b46192da8fb32fff035c097b067852e /stdoutShow.go
parentb8b8a409ea77f457bbb3490f5282bf9b3ff88c3e (diff)
leave this code as a reminder for later
Diffstat (limited to 'stdoutShow.go')
-rw-r--r--stdoutShow.go30
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
}