summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-14 04:28:12 -0600
committerJeff Carr <[email protected]>2024-11-14 04:28:12 -0600
commit15666309ee5188d0304f24f401113f6f56b05a32 (patch)
tree584047b0e97ccf59752f68321455779a2722bdbb
parentaae13f2b5763bafbd09ab29d6789e26f7209869f (diff)
fakefile writes to stdout window work
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--keybindings.go8
-rw-r--r--structs.go3
2 files changed, 11 insertions, 0 deletions
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