diff --git a/keybindings.go b/keybindings.go index e1af3f0..4771642 100644 --- a/keybindings.go +++ b/keybindings.go @@ -143,6 +143,14 @@ func addDebugKeys(g *gocui.Gui) { if tk.v == nil { log.Log(ERROR, "tk.v = nil") } + if me.fakefile == nil { + log.Log(ERROR, "making fakefile") + me.fakefile = NewFakeFile(tk.v) + } else { + log.Log(ERROR, "attempt write to fakefile") + fmt.Fprintf(me.fakefile, "test out fakefile %d\n", ecount) + } + // log.CaptureMode(tk.v) return nil }) diff --git a/structs.go b/structs.go index 4fc2df1..c69971b 100644 --- a/structs.go +++ b/structs.go @@ -99,6 +99,9 @@ type config struct { // used for listWidgets() debugging depth int + + // used to attempt to write to the stdout window + fakefile *FakeFile } // deprecate these