From a39f33fe15648de11aac456d88fd69c5dfbb1ddb Mon Sep 17 00:00:00 2001 From: Eitan Joffe Date: Tue, 18 Apr 2023 13:06:36 -0700 Subject: [PATCH] check for valid terminal width before cropping line fixes #286 commit-id:8cf06bec --- github/pullrequest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github/pullrequest.go b/github/pullrequest.go index 019c464..5ad920f 100644 --- a/github/pullrequest.go +++ b/github/pullrequest.go @@ -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] + "..." }