diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-27 06:55:27 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-27 06:55:27 +0200 |
| commit | e2c600f6d80785c0d41853ae1fd6701c2f63db17 (patch) | |
| tree | 7ebf7d7132874ece0801b4161eb9cf8f30dc2c64 /internal/termprint | |
| parent | f19a4740992f3fd5f6d2f8b13850c9eb637f6a76 (diff) | |
fix ask description width 84f1af4e-be84-4265-9df2-8f6932059913
Diffstat (limited to 'internal/termprint')
| -rw-r--r-- | internal/termprint/columns.go | 8 |
1 files changed, 6 insertions, 2 deletions
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} |
