diff options
| author | Jeff Carr <[email protected]> | 2023-04-24 06:22:14 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-04-24 06:22:14 -0500 |
| commit | d38b05d2d5a2c2ff0c66b541f7d80cbd1c250d76 (patch) | |
| tree | 5c0540c8efac7cf59fefc2624bf8de5654a7393f /toolkit/gocui/showMsg.go | |
| parent | fbe943540106f1c12971932fd92f9395bbe214b3 (diff) | |
gocui: always show STDOUT
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/showMsg.go')
| -rw-r--r-- | toolkit/gocui/showMsg.go | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/toolkit/gocui/showMsg.go b/toolkit/gocui/showMsg.go deleted file mode 100644 index e749834..0000000 --- a/toolkit/gocui/showMsg.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2014 The gocui Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package main - -import ( - "errors" - "fmt" - - "github.com/awesome-gocui/gocui" -) - -var outputW int = 80 -var outputH int = 24 - -func moveMsg(g *gocui.Gui) { - mx, my := g.MousePosition() - if !movingMsg && (mx != initialMouseX || my != initialMouseY) { - movingMsg = true - } - g.SetView("msg", mx-xOffset, my-yOffset, mx-xOffset+outputW, my-yOffset+outputH, 0) -} - -func showMsg(g *gocui.Gui, v *gocui.View) error { - var l string - var err error - - if _, err := g.SetCurrentView(v.Name()); err != nil { - return err - } - - _, cy := v.Cursor() - if l, err = v.Line(cy); err != nil { - l = "" - } - // setOutput(me.rootNode) - - maxX, maxY := g.Size() - if v, err := g.SetView("msg", maxX/2, maxY/2, maxX/2+outputW, maxY/2+outputH, 0); err == nil || errors.Is(err, gocui.ErrUnknownView) { - v.Clear() - v.SelBgColor = gocui.ColorCyan - v.SelFgColor = gocui.ColorBlack - l += "foo\n" + "bar\n" - fmt.Fprintln(v, l) - } - // g.SetViewOnTop("msg") - g.SetViewBeneath("msg", "help", 24) - // g.SetViewOnBottom("msg") - return nil -} |
