Skip to content

Commit

Permalink
Fix LineSpan divide by zero (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
qiukeren authored Jun 11, 2023
1 parent aaf071b commit f5daa5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/term/term.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func GetWidth() (termWidth int) {
fd := int(stdoutTerm.Fd())
termWidth, _, err = GetSize(fd)

if err != nil {
if err != nil || termWidth == 0 {
termWidth = defaultTermWidth
}

Expand Down

0 comments on commit f5daa5f

Please sign in to comment.