From e2c600f6d80785c0d41853ae1fd6701c2f63db17 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 27 Mar 2026 06:55:27 +0200 Subject: fix ask description width 84f1af4e-be84-4265-9df2-8f6932059913 --- internal/termprint/columns.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'internal/termprint') diff --git a/internal/termprint/columns.go b/internal/termprint/columns.go index 25cc07e..5950d76 100644 --- a/internal/termprint/columns.go +++ b/internal/termprint/columns.go @@ -36,7 +36,7 @@ func NewColumnPrinter(stdout io.Writer, providers []string, models []string) *Co return nil } - width := detectTerminalWidth(stdout) + width := DetectTerminalWidth(stdout) if width <= 0 { width = 100 } @@ -61,7 +61,7 @@ func NewColumnPrinter(stdout io.Writer, providers []string, models []string) *Co } } -func detectTerminalWidth(w io.Writer) int { +func DetectTerminalWidth(w io.Writer) int { type fder interface{ Fd() uintptr } if f, ok := w.(*os.File); ok { if width, _, err := term.GetSize(int(f.Fd())); err == nil { @@ -76,6 +76,10 @@ func detectTerminalWidth(w io.Writer) int { return 0 } +func detectTerminalWidth(w io.Writer) int { + return DetectTerminalWidth(w) +} + // Writer returns an io.Writer that routes chunks to a single column index. func (cp *ColumnPrinter) Writer(idx int) io.Writer { return columnWriter{printer: cp, index: idx} -- cgit v1.2.3