summaryrefslogtreecommitdiff
path: root/debug.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-08 14:43:38 -0600
committerJeff Carr <[email protected]>2025-02-08 14:43:38 -0600
commitea544e429e1afbb60e91d2cba6caf85d8e08cc64 (patch)
tree8ee20262538ca3b7c0497bfd4d5bca6b4021487f /debug.go
parent58cb7f3d2d8cd102081ba545081f20bf0d6fd211 (diff)
setting the size of the textbox correctly
Diffstat (limited to 'debug.go')
-rw-r--r--debug.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/debug.go b/debug.go
index e820c07..7aeaa33 100644
--- a/debug.go
+++ b/debug.go
@@ -5,6 +5,7 @@ package main
import (
"fmt"
+ "strings"
"github.com/awesome-gocui/gocui"
"go.wit.com/log"
@@ -87,8 +88,13 @@ func (tk *guiWidget) dumpWidget(s string) {
curval := tk.String()
if curval == "" {
curval = tk.node.GetLabel()
+ curval = strings.TrimSpace(curval)
}
- end = fmt.Sprintf("%-8s %-8s %s", tk.node.WidgetType, tk.cuiName, tk.String())
+ if curval == "" {
+ curval = tk.labelN
+ curval = strings.TrimSpace(curval)
+ }
+ end = fmt.Sprintf("%-8s %-8s %s", tk.node.WidgetType, tk.cuiName, curval)
}
log.Log(GOCUI, s1, s, end)
}