set min term width
This commit is contained in:
parent
ed2d941259
commit
fa9f33a5de
1 changed files with 8 additions and 0 deletions
|
@ -12,6 +12,10 @@ import (
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
minTerminalWidth = 40
|
||||||
|
)
|
||||||
|
|
||||||
type theme struct {
|
type theme struct {
|
||||||
reset string
|
reset string
|
||||||
boldblue string
|
boldblue string
|
||||||
|
@ -49,6 +53,10 @@ func NewPrinter(
|
||||||
grey: "\033[90m",
|
grey: "\033[90m",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if maxTerminalWidth < minTerminalWidth {
|
||||||
|
maxTerminalWidth = minTerminalWidth
|
||||||
|
}
|
||||||
|
|
||||||
return &Printer{
|
return &Printer{
|
||||||
noColor: noColor,
|
noColor: noColor,
|
||||||
maxTerminalWidth: maxTerminalWidth,
|
maxTerminalWidth: maxTerminalWidth,
|
||||||
|
|
Loading…
Reference in a new issue