summaryrefslogtreecommitdiff
path: root/toolkit/gocui/structs.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-27 20:41:53 -0500
committerJeff Carr <[email protected]>2023-04-27 20:41:53 -0500
commit9e285c7affa3257a46e85acde6dc64a9c781b728 (patch)
tree7e957fc0b5f6e631e762baffe292828e318e0910 /toolkit/gocui/structs.go
parent6f441738061b0528e86183402474ddb1cdf3c77a (diff)
gocui: grid width fixed
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'toolkit/gocui/structs.go')
-rw-r--r--toolkit/gocui/structs.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/toolkit/gocui/structs.go b/toolkit/gocui/structs.go
index 09d1f33..e9f89af 100644
--- a/toolkit/gocui/structs.go
+++ b/toolkit/gocui/structs.go
@@ -157,8 +157,8 @@ type cuiWidget struct {
b bool
i int
s string
- x int
- y int
+ X int
+ Y int
width int
height int
@@ -205,10 +205,12 @@ func (w *cuiWidget) Write(p []byte) (n int, err error) {
defer me.writeMutex.Unlock()
if (me.logStdout.v == nil) {
// optionally write the output to /tmp
- fmt.Fprintln(outf, string(p))
+ s := fmt.Sprint(string(p))
+ s = strings.TrimSuffix(s, "\n")
+ fmt.Fprintln(outf, s)
v, _ := me.baseGui.View("msg")
if (v != nil) {
- fmt.Fprintln(outf, "found msg")
+ // fmt.Fprintln(outf, "found msg")
me.logStdout.v = v
}
} else {