From 23a1400692b1cc073945e6243fa8fd2b8c8bd231 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 26 Sep 2025 13:05:00 -0500 Subject: actually get the terminal width --- tablePB.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tablePB.go') diff --git a/tablePB.go b/tablePB.go index 8d55313..ab1f74a 100644 --- a/tablePB.go +++ b/tablePB.go @@ -23,6 +23,9 @@ func PrintTable(pb *guipb.Table) { } else { // log.Info("grid.Id =", pb.Grid.Id) } + if cursize, ok := getTerminalWidth(); ok { + TERMSIZE = cursize + } var h int = 0 var w int = 0 @@ -46,7 +49,9 @@ func PrintTable(pb *guipb.Table) { sizes = append(sizes, int(attr.Width)) } } - header, _ := StandardTableRowDebug(sizes, args) + // header, _ := StandardTableRowDebug(sizes, args) + // log.Info(header) + header, _ := StandardTableRow(sizes, args) log.Info(header) for i := range HEIGHT { -- cgit v1.2.3