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"
|
||||
)
|
||||
|
||||
const (
|
||||
minTerminalWidth = 40
|
||||
)
|
||||
|
||||
type theme struct {
|
||||
reset string
|
||||
boldblue string
|
||||
|
@ -49,6 +53,10 @@ func NewPrinter(
|
|||
grey: "\033[90m",
|
||||
}
|
||||
|
||||
if maxTerminalWidth < minTerminalWidth {
|
||||
maxTerminalWidth = minTerminalWidth
|
||||
}
|
||||
|
||||
return &Printer{
|
||||
noColor: noColor,
|
||||
maxTerminalWidth: maxTerminalWidth,
|
||||
|
|
Loading…
Reference in a new issue