diff --git a/keybindings.go b/keybindings.go index f9fa0b4..d4752b7 100644 --- a/keybindings.go +++ b/keybindings.go @@ -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 })