stdout window much closer
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
aea18d5b65
commit
c02399708e
|
@ -5,7 +5,6 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/awesome-gocui/gocui"
|
"github.com/awesome-gocui/gocui"
|
||||||
|
@ -18,6 +17,7 @@ func handle_ctrl_z(g *gocui.Gui, v *gocui.View) error {
|
||||||
gocui.Suspend()
|
gocui.Suspend()
|
||||||
log.Info("got ctrl+z")
|
log.Info("got ctrl+z")
|
||||||
syscall.Kill(syscall.Getpid(), syscall.SIGSTOP)
|
syscall.Kill(syscall.Getpid(), syscall.SIGSTOP)
|
||||||
|
log.Info("got ctrl+z syscall() done")
|
||||||
gocui.Resume()
|
gocui.Resume()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -135,27 +135,17 @@ func addDebugKeys(g *gocui.Gui) {
|
||||||
me.treeRoot.ListWidgets()
|
me.treeRoot.ListWidgets()
|
||||||
|
|
||||||
tk := me.logStdout.TK.(*guiWidget)
|
tk := me.logStdout.TK.(*guiWidget)
|
||||||
msg := fmt.Sprintf("test out kb %d\n", ecount)
|
// msg := fmt.Sprintf("test out kb %d\n", ecount)
|
||||||
tk.Write([]byte(msg))
|
// tk.Write([]byte(msg))
|
||||||
if tk == nil {
|
if tk == nil {
|
||||||
log.Log(ERROR, "tk = nil")
|
log.Log(ERROR, "tk = nil")
|
||||||
}
|
}
|
||||||
if tk.v == nil {
|
if tk.v == nil {
|
||||||
log.Log(ERROR, "tk.v = nil")
|
log.Log(ERROR, "tk.v = nil")
|
||||||
} else {
|
} else {
|
||||||
// log.Log(ERROR, "setting log.CaptureMode(tk.v)")
|
log.Log(ERROR, "setting log.CaptureMode(tk.v)")
|
||||||
// log.Log(ERROR, "setting log.CaptureMode(tk.v)")
|
log.Log(ERROR, "setting log.CaptureMode(tk.v)")
|
||||||
// log.CaptureMode(tk.v)
|
log.CaptureMode(tk)
|
||||||
}
|
|
||||||
if me.fakefile == nil {
|
|
||||||
log.Log(ERROR, "making fakefile")
|
|
||||||
me.fakefile = NewFakeFile(tk.v)
|
|
||||||
log.Log(ERROR, "setting log.CaptureMode(fakefile)")
|
|
||||||
log.CaptureMode(me.fakefile)
|
|
||||||
log.Log(ERROR, "set log.CaptureMode(fakefile)")
|
|
||||||
} else {
|
|
||||||
log.Log(ERROR, "attempt write to fakefile")
|
|
||||||
fmt.Fprintf(me.fakefile, "test out fakefile ecount=%d fakecount=%d\n", ecount, fakecount)
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue