summaryrefslogtreecommitdiff
path: root/stdoutShow.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-06 02:40:44 -0600
committerJeff Carr <[email protected]>2025-02-06 02:40:44 -0600
commit88e9594b9304aa8be7c1b766d54bb07979201a66 (patch)
tree41f6f3d290be1fdf62b1d0d89715d6351c8abbe0 /stdoutShow.go
parent3faacd6c43e451847af8143a0c58bfd95535478d (diff)
removing old crappy code finally
Diffstat (limited to 'stdoutShow.go')
-rw-r--r--stdoutShow.go36
1 files changed, 21 insertions, 15 deletions
diff --git a/stdoutShow.go b/stdoutShow.go
index 4b6d4d0..740a6c4 100644
--- a/stdoutShow.go
+++ b/stdoutShow.go
@@ -34,10 +34,7 @@ func showMsg(g *gocui.Gui, v *gocui.View) error {
}
func makeOutputWidget(g *gocui.Gui, stringFromMouseClick string) *gocui.View {
- maxX, maxY := g.Size()
-
- var outputW int = 180
- var outputH int = 40
+ // maxX, maxY := g.Size()
if me.treeRoot == nil {
// keep skipping this until the binary tree is initialized
@@ -57,11 +54,13 @@ func makeOutputWidget(g *gocui.Gui, stringFromMouseClick string) *gocui.View {
tk := me.logStdout
// tk.gocuiSize.w0 = maxX - 32
// tk.gocuiSize.h0 = maxY / 2
- tk.gocuiSize.w0 = me.startOutputW
- tk.gocuiSize.h0 = me.startOutputH
- tk.gocuiSize.w1 = tk.gocuiSize.w0 + outputW
- tk.gocuiSize.h1 = tk.gocuiSize.h0 + outputH
+ tk.gocuiSize.w0 = 30
+ tk.gocuiSize.h0 = 10
+ tk.gocuiSize.w1 = tk.gocuiSize.w0 + me.stdout.w
+ tk.gocuiSize.h1 = tk.gocuiSize.h0 + me.stdout.h
+
}
+
v, err := g.View("msg")
if v == nil {
log.Log(NOW, "makeoutputwindow() this is supposed to happen. v == nil", err)
@@ -69,14 +68,21 @@ func makeOutputWidget(g *gocui.Gui, stringFromMouseClick string) *gocui.View {
log.Log(NOW, "makeoutputwindow() msg != nil. WTF now? err =", err)
}
- if me.startOutputW == 0 {
- me.startOutputW = maxX - 132
- }
- if me.startOutputW == 0 {
- me.startOutputH = maxY / 2
- }
+ /*
+ if me.startOutputW == 0 {
+ me.startOutputW = maxX - 132
+ }
+ if me.startOutputW == 0 {
+ me.startOutputH = maxY / 2
+ }
+ */
- v, err = g.SetView("msg", me.startOutputW, me.startOutputH, maxX/2+outputW, maxY/2+outputH, 0)
+ a := me.logStdout.gocuiSize.w0
+ b := me.logStdout.gocuiSize.h0
+ c := me.logStdout.gocuiSize.w1
+ d := me.logStdout.gocuiSize.h1
+ v, err = g.SetView("msg", a, b, c, d, 0)
+ // v, err = g.SetView("msg", me.startOutputW, me.startOutputH, maxX/2+me.stdout.w, maxY/2+me.stdout.h, 0)
if errors.Is(err, gocui.ErrUnknownView) {
log.Log(NOW, "makeoutputwindow() this is supposed to happen?", err)
}