diff options
Diffstat (limited to 'showStdout.go')
| -rw-r--r-- | showStdout.go | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/showStdout.go b/showStdout.go index 06feb78..13dd61a 100644 --- a/showStdout.go +++ b/showStdout.go @@ -19,6 +19,8 @@ func moveMsg(g *gocui.Gui) { movingMsg = true } g.SetView("msg", mx-xOffset, my-yOffset, mx-xOffset+outputW, my-yOffset+outputH+me.FramePadH, 0) + me.startOutputW = mx-xOffset + me.startOutputH = my-yOffset g.SetViewOnBottom("msg") } @@ -61,8 +63,10 @@ func makeOutputWidget(g *gocui.Gui, stringFromMouseClick string) *gocui.View { var tk *guiWidget tk = me.logStdout.TK.(*guiWidget) - tk.gocuiSize.w0 = maxX - 32 - tk.gocuiSize.h0 = maxY / 2 + // 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 } @@ -76,7 +80,15 @@ func makeOutputWidget(g *gocui.Gui, stringFromMouseClick string) *gocui.View { // help, err := g.SetView("help", maxX-32, 0, maxX-1, 13, 0) // v, err = g.SetView("msg", 3, 3, 30, 30, 0) - v, err = g.SetView("msg", maxX-32, maxY/2, maxX/2+outputW, maxY/2+outputH, 0) + if me.startOutputW == 0 { + me.startOutputW = maxX - 32 + } + if me.startOutputW == 0 { + me.startOutputH = maxY / 2 + } + + // v, err = g.SetView("msg", maxX-32, maxY/2, maxX/2+outputW, maxY/2+outputH, 0) + v, err = g.SetView("msg", me.startOutputW, me.startOutputH, maxX/2+outputW, maxY/2+outputH, 0) if errors.Is(err, gocui.ErrUnknownView) { log.Log(NOW, "makeoutputwindow() this is supposed to happen?", err) } |
