output window works with keypress 'L'
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
368c25107a
commit
2461df0153
|
@ -134,14 +134,15 @@ func addDebugKeys(g *gocui.Gui) {
|
||||||
func(g *gocui.Gui, v *gocui.View) error {
|
func(g *gocui.Gui, v *gocui.View) error {
|
||||||
me.treeRoot.ListWidgets()
|
me.treeRoot.ListWidgets()
|
||||||
|
|
||||||
w := me.logStdout.TK.(*guiWidget)
|
tk := me.logStdout.TK.(*guiWidget)
|
||||||
msg := fmt.Sprintf("test out %d\n", ecount)
|
msg := fmt.Sprintf("test out kb %d\n", ecount)
|
||||||
msg += fmt.Sprintf("test out %d\n", ecount)
|
tk.Write([]byte(msg))
|
||||||
msg += fmt.Sprintf("test out %d\n", ecount)
|
if tk == nil {
|
||||||
w.Write([]byte(msg + msg + msg))
|
log.Log(ERROR, "tk = nil")
|
||||||
w.Write([]byte(msg + msg + msg))
|
}
|
||||||
w.Write([]byte(msg + msg + msg))
|
if tk.v == nil {
|
||||||
w.Write([]byte(msg + msg + msg))
|
log.Log(ERROR, "tk.v = nil")
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -164,16 +165,23 @@ func addDebugKeys(g *gocui.Gui) {
|
||||||
// log to output window
|
// log to output window
|
||||||
g.SetKeybinding("", 'o', gocui.ModNone,
|
g.SetKeybinding("", 'o', gocui.ModNone,
|
||||||
func(g *gocui.Gui, v *gocui.View) error {
|
func(g *gocui.Gui, v *gocui.View) error {
|
||||||
log.Log(ERROR, "TODO: re-implement this")
|
log.Log(ERROR, "TODO: trying re-implement this")
|
||||||
/*
|
tk := me.logStdout.TK.(*guiWidget)
|
||||||
if me.logStdout.Visible() {
|
if tk == nil {
|
||||||
me.logStdout.SetVisible(false)
|
log.Log(ERROR, "tk = nil")
|
||||||
// setOutput(os.Stdout)
|
}
|
||||||
} else {
|
if tk.v == nil {
|
||||||
me.logStdout.SetVisible(true)
|
log.Log(ERROR, "tk.v = nil")
|
||||||
// setOutput(me.logStdout.tk)
|
}
|
||||||
}
|
if tk.Visible() {
|
||||||
*/
|
log.Log(ERROR, "setting visible to false")
|
||||||
|
tk.SetVisible(false)
|
||||||
|
// setOutput(os.Stdout)
|
||||||
|
} else {
|
||||||
|
log.Log(ERROR, "setting visible to true")
|
||||||
|
tk.SetVisible(true)
|
||||||
|
// setOutput(me.logStdout.tk)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue