terminal: cleanup determining width

This commit is contained in:
Michael Eischer
2025-09-07 14:26:42 +02:00
parent 0b0dd07f15
commit 43b5166de8
4 changed files with 10 additions and 8 deletions

View File

@@ -210,7 +210,7 @@ func clearLine(w int) string {
// ANSI sequences are not supported on Windows cmd shell.
if w <= 0 {
if w = terminal.StdoutTerminalWidth(); w <= 0 {
if w = terminal.StdoutWidth(); w <= 0 {
return ""
}
}