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
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"syscall"
|
||||
|
||||
"github.com/awesome-gocui/gocui"
|
||||
|
@ -18,6 +17,7 @@ func handle_ctrl_z(g *gocui.Gui, v *gocui.View) error {
|
|||
gocui.Suspend()
|
||||
log.Info("got ctrl+z")
|
||||
syscall.Kill(syscall.Getpid(), syscall.SIGSTOP)
|
||||
log.Info("got ctrl+z syscall() done")
|
||||
gocui.Resume()
|
||||
return nil
|
||||
}
|
||||
|
@ -135,27 +135,17 @@ func addDebugKeys(g *gocui.Gui) {
|
|||
me.treeRoot.ListWidgets()
|
||||
|
||||
tk := me.logStdout.TK.(*guiWidget)
|
||||
msg := fmt.Sprintf("test out kb %d\n", ecount)
|
||||
tk.Write([]byte(msg))
|
||||
// msg := fmt.Sprintf("test out kb %d\n", ecount)
|
||||
// tk.Write([]byte(msg))
|
||||
if tk == nil {
|
||||
log.Log(ERROR, "tk = nil")
|
||||
}
|
||||
if tk.v == nil {
|
||||
log.Log(ERROR, "tk.v = nil")
|
||||
} else {
|
||||
// log.Log(ERROR, "setting log.CaptureMode(tk.v)")
|
||||
// log.Log(ERROR, "setting log.CaptureMode(tk.v)")
|
||||
// log.CaptureMode(tk.v)
|
||||
}
|
||||
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)
|
||||
log.Log(ERROR, "setting log.CaptureMode(tk.v)")
|
||||
log.Log(ERROR, "setting log.CaptureMode(tk.v)")
|
||||
log.CaptureMode(tk)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue