Skip to content

Commit

Permalink
check for valid terminal width before cropping line
Browse files Browse the repository at this point in the history
fixes #286

commit-id:8cf06bec
  • Loading branch information
ejoffe committed Apr 18, 2023
1 parent 70003a9 commit a39f33f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github/pullrequest.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (pr *PullRequest) String(config *config.Config) string {
lineLength += 4
}
diff := lineLength - terminalWidth
if diff > 0 {
if diff > 0 && terminalWidth > 3 {
line = line[:terminalWidth-3] + "..."
}

Expand Down

0 comments on commit a39f33f

Please sign in to comment.