From 57fa0dc00c8141c252c8ec452f8a34448315c33d Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 26 Oct 2025 13:47:33 -0500 Subject: leave 1 char on each side --- humanTable.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'humanTable.go') diff --git a/humanTable.go b/humanTable.go index 9fe164d..17b84a1 100644 --- a/humanTable.go +++ b/humanTable.go @@ -42,14 +42,15 @@ func StandardTableRow(sizes []int, args []string) (string, string) { line := strings.Join(parts, " ") var small int - if len(line) > TERMSIZE { - small = TERMSIZE + if len(line) > TERMSIZE-2 { + small = TERMSIZE - 2 } else { + small = len(line) // todo: do something else with this - small = len(line) - 3 - if small < 0 { - small = 0 - } + // small = len(line) - 3 + // if small < 0 { + // small = 0 + // } } return line[0:small], strings.Join(fmts, " ") } -- cgit v1.2.3