Fix crash in `issue/pr list` for narrow terminals
If the available column width is smaller than 3, don't try to truncate with ellipsis (`...`). Instead, just truncate to available width.

Fixes #431
### Describe the bug

From within the directory for a cloned repo, I ran "gh pr list". The output successfully printed the organization and repo name, and then paniced

gh --version                                                                                                                                                                             
gh version 0.5.5 (2020-02-13)                                                                                                                                                                                                                  
https://github.com/cli/cli/releases/tag/v0.5.5           

### Steps to reproduce the behavior

"gh pr list" issued against a private repo

### Expected vs actual behavior

I expected it not to panic :-)

### Logs

```
$ gh pr list                                                                                                                                                                               
                                                                                                                                                                                                                                               
Pull requests for Xeograph/xgsrc                                                                                                                                                                                                               
                                                                                                                                                                                                                                               
#9713  panic: runtime error: slice bounds out of range [:-7]                                                                                                                                                                                   
                                                                                                                                                                                                                                               
goroutine 1 [running]:                                                                                                                                                                                                                         
github.com/cli/cli/utils.truncate(0xfffffffffffffffc, 0xc00075a960, 0x22, 0x1, 0x1)                                                                                                                                                            
    /home/runner/work/cli/cli/utils/table_printer.go:179 +0xa6                                                                                                                                                                                 
github.com/cli/cli/utils.(*ttyTablePrinter).Render(0xc0005ae4e0, 0xc00057ad80, 0x16)                                                                                                                                                           
    /home/runner/work/cli/cli/utils/table_printer.go:128 +0x339                                                                                                                                                                                
github.com/cli/cli/command.prList(0x109bac0, 0x10cbb30, 0x0, 0x0, 0x0, 0x0)                                                                                                                                                                    
    /home/runner/work/cli/cli/command/pr.go:221 +0x9f3                                                                                                                                                                                         
github.com/spf13/cobra.(*Command).execute(0x109bac0, 0x10cbb30, 0x0, 0x0, 0x109bac0, 0x10cbb30)                                                                                                                                                
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826 +0x460                                                                                                                                                                
github.com/spf13/cobra.(*Command).ExecuteC(0x109a940, 0x5, 0x0, 0x0)                                                                                                                                                                           
    /home/runner/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb                                                                                                                                                                
main.main()                                                                                                                                                                                                                                    
    /home/runner/work/cli/cli/cmd/gh/main.go:33 +0xde      
```


Panic running "gh pr list at /home/runner/work/cli/cli/utils/table_printer.go:179
diff --git a/utils/table_printer.go b/utils/table_printer.go
index 649e246e1de..e1bf9bc36fe 100644
--- a/utils/table_printer.go
+++ b/utils/table_printer.go
@@ -176,7 +176,10 @@ func (t *tsvTablePrinter) Render() error {
 
 func truncate(maxLength int, title string) string {
 	if len(title) > maxLength {
-		return title[0:maxLength-3] + "..."
+		if maxLength > 3 {
+			return title[0:maxLength-3] + "..."
+		}
+		return title[0:maxLength]
 	}
 	return title
 }

diff --git a/utils/table_printer_test.go b/utils/table_printer_test.go
new file mode 100644
index 00000000000..2e3e4e8035d
--- /dev/null
+++ b/utils/table_printer_test.go
@@ -0,0 +1,31 @@
+package utils
+
+import (
+	"bytes"
+	"testing"
+)
+
+func Test_ttyTablePrinter_truncate(t *testing.T) {
+	buf := bytes.Buffer{}
+	tp := &ttyTablePrinter{
+		out:      &buf,
+		maxWidth: 5,
+	}
+
+	tp.AddField("1", nil, nil)
+	tp.AddField("hello", nil, nil)
+	tp.EndRow()
+	tp.AddField("2", nil, nil)
+	tp.AddField("world", nil, nil)
+	tp.EndRow()
+
+	err := tp.Render()
+	if err != nil {
+		t.Fatalf("unexpected error: %v", err)
+	}
+
+	expected := "1  he\n2  wo\n"
+	if buf.String() != expected {
+		t.Errorf("expected: %q, got: %q", expected, buf.String())
+	}
+}

{"TestFuzzyAgo": {"run": "PASS", "test": "NONE", "fix": "PASS"}, "Test_ttyTablePrinter_truncate": {"run": "NONE", "test": "FAIL", "fix": "PASS"}}
{"TestExtractName/Incomplete_front-matter": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPullRequest_ChecksStatus": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueView_preview": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRView_urlArg": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestCompletion_fish": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRView_branchArg": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRCheckout_differentRepo_existingBranch": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestReplaceExcessiveWhitespace": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "Test_sshParse": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestCheckForUpdate/current_is_prerelease": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestFind/Multiple_templates": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestFind": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestGitStatusHelperProcess": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRStatus_reviewsAndChecks": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestChangelogURL": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueStatus_disabledIssues": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueCreate": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestCheckForUpdate": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueView": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestGraphQLError": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRView_previewCurrentBranch": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestFind/Empty_multiple_templates_directory": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestExtractName": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestGraphQL": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRStatus_blankSlate": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestForOS/Windows": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRView_branchWithOwnerArg": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestCompletion_bash": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestExtractName/No_front-matter": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRList": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "Test_printError/Cobra_flag_error": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestCompletion_zsh": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestForOS": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRCheckout_differentRepo_remoteExists": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRCreate_ReportsUncommittedChanges": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestExtractName/Complete_front-matter": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRCheckout_urlArg": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueView_previewWithEmptyBody": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "Test_UncommittedChangeCount": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueView_urlArg": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "Test_printError/DNS_error": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueStatus": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestFind/Template_in_docs": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueCreate_web": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestExtractContents": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRCheckout_existingBranch": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestFind/Template_in_.github_takes_precedence": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "Test_printError/generic_error": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueCreate_disabledIssues": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestFind/Template_in_root": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestCompletion_unsupported": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRCheckout_sameRepo": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRCreate": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueList_disabledIssues": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "Test_Translator": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRList_filteringAssignee": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRList_filteringAssigneeLabels": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRView_currentBranch": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueList_withFlags": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestExtractContents/Has_front-matter": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRView_previewCurrentBranchWithEmptyBody": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestExtractContents/No_front-matter": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRCheckout_differentRepo_currentBranch": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestCheckForUpdate/latest_is_older": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRView_preview": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueList": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRCheckout_maintainerCanModify": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueView_disabledIssues": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestCheckForUpdate/latest_is_current": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRView_numberArg": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRView_noResultsForBranch": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "Test_printError": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRCreate_web": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRStatus": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "Test_printError/unknown_Cobra_command_error": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPrCreateHelperProcess": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestForOS/macOS": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestForOS/Linux": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRCheckout_branchArg": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "Test_repoFromURL": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRCreate_cross_repo_same_branch": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "Test_parseRemotes": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRCheckout_differentRepo": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueView_notFound": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestPRList_filtering": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueStatus_blankSlate": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestIssueList_nullAssigneeLabels": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "TestCheckForUpdate/latest_is_newer": {"run": "PASS", "test": "PASS", "fix": "PASS"}, "Test_repoFromURL_invalid": {"run": "PASS", "test": "PASS", "fix": "PASS"}}
{"Test_ttyTablePrinter_truncate": {"run": "NONE", "test": "FAIL", "fix": "PASS"}}
{"TestFuzzyAgo": {"run": "PASS", "test": "NONE", "fix": "PASS"}}
{"passed_count": 90, "failed_count": 1, "skipped_count": 0, "passed_tests": ["TestExtractName/Incomplete_front-matter", "TestPullRequest_ChecksStatus", "TestPRView_urlArg", "TestCompletion_fish", "TestPRView_branchArg", "TestReplaceExcessiveWhitespace", "TestFind/Multiple_templates", "TestFind", "TestPRStatus_reviewsAndChecks", "TestChangelogURL", "TestCheckForUpdate", "TestPRView_previewCurrentBranch", "TestGraphQL", "TestPRStatus_blankSlate", "TestPRView_branchWithOwnerArg", "TestCompletion_bash", "TestExtractName/No_front-matter", "Test_printError/Cobra_flag_error", "TestCompletion_zsh", "TestForOS", "TestIssueView_previewWithEmptyBody", "Test_UncommittedChangeCount", "Test_printError/DNS_error", "TestIssueStatus", "TestFind/Template_in_docs", "TestExtractContents", "TestFind/Template_in_.github_takes_precedence", "Test_printError/generic_error", "TestPRCheckout_sameRepo", "TestIssueList_disabledIssues", "TestPRList_filteringAssigneeLabels", "TestPRView_currentBranch", "TestIssueList_withFlags", "TestExtractContents/Has_front-matter", "TestPRView_previewCurrentBranchWithEmptyBody", "TestPRView_preview", "TestIssueView_disabledIssues", "TestCheckForUpdate/latest_is_current", "TestPRCreate_web", "TestPRCheckout_branchArg", "TestPRCheckout_differentRepo", "TestPRList_filtering", "Test_repoFromURL_invalid", "TestIssueView_preview", "TestPRCheckout_differentRepo_existingBranch", "Test_sshParse", "TestCheckForUpdate/current_is_prerelease", "TestGitStatusHelperProcess", "TestIssueStatus_disabledIssues", "TestIssueCreate", "TestIssueView", "TestGraphQLError", "TestFind/Empty_multiple_templates_directory", "TestExtractName", "TestForOS/Windows", "TestFuzzyAgo", "TestPRList", "TestPRCheckout_differentRepo_remoteExists", "TestPRCreate_ReportsUncommittedChanges", "TestExtractName/Complete_front-matter", "TestPRCheckout_urlArg", "TestIssueView_urlArg", "TestIssueCreate_web", "TestPRCheckout_existingBranch", "TestIssueCreate_disabledIssues", "TestFind/Template_in_root", "TestCompletion_unsupported", "TestPRCreate", "Test_Translator", "TestPRList_filteringAssignee", "TestExtractContents/No_front-matter", "TestPRCheckout_differentRepo_currentBranch", "TestCheckForUpdate/latest_is_older", "TestIssueList", "TestPRCheckout_maintainerCanModify", "TestPRView_numberArg", "TestPRView_noResultsForBranch", "Test_printError", "TestPRStatus", "Test_printError/unknown_Cobra_command_error", "TestPrCreateHelperProcess", "TestForOS/macOS", "TestForOS/Linux", "Test_repoFromURL", "TestPRCreate_cross_repo_same_branch", "Test_parseRemotes", "TestIssueView_notFound", "TestIssueStatus_blankSlate", "TestIssueList_nullAssigneeLabels", "TestCheckForUpdate/latest_is_newer"], "failed_tests": ["github.com/cli/cli/context"], "skipped_tests": []}
{"passed_count": 89, "failed_count": 3, "skipped_count": 0, "passed_tests": ["TestExtractName/Incomplete_front-matter", "TestPullRequest_ChecksStatus", "TestPRView_urlArg", "TestCompletion_fish", "TestPRView_branchArg", "TestReplaceExcessiveWhitespace", "TestFind/Multiple_templates", "TestFind", "TestPRStatus_reviewsAndChecks", "TestChangelogURL", "TestCheckForUpdate", "TestPRView_previewCurrentBranch", "TestGraphQL", "TestPRStatus_blankSlate", "TestPRView_branchWithOwnerArg", "TestCompletion_bash", "TestExtractName/No_front-matter", "Test_printError/Cobra_flag_error", "TestCompletion_zsh", "TestForOS", "TestIssueView_previewWithEmptyBody", "Test_UncommittedChangeCount", "Test_printError/DNS_error", "TestIssueStatus", "TestFind/Template_in_docs", "TestExtractContents", "TestFind/Template_in_.github_takes_precedence", "Test_printError/generic_error", "TestPRCheckout_sameRepo", "TestIssueList_disabledIssues", "TestPRList_filteringAssigneeLabels", "TestPRView_currentBranch", "TestIssueList_withFlags", "TestExtractContents/Has_front-matter", "TestPRView_previewCurrentBranchWithEmptyBody", "TestPRView_preview", "TestIssueView_disabledIssues", "TestCheckForUpdate/latest_is_current", "TestPRCreate_web", "TestPRCheckout_branchArg", "TestPRCheckout_differentRepo", "TestPRList_filtering", "Test_repoFromURL_invalid", "TestIssueView_preview", "TestPRCheckout_differentRepo_existingBranch", "Test_sshParse", "TestCheckForUpdate/current_is_prerelease", "TestGitStatusHelperProcess", "TestIssueStatus_disabledIssues", "TestIssueCreate", "TestIssueView", "TestGraphQLError", "TestFind/Empty_multiple_templates_directory", "TestExtractName", "TestForOS/Windows", "TestPRList", "TestPRCheckout_differentRepo_remoteExists", "TestPRCreate_ReportsUncommittedChanges", "TestExtractName/Complete_front-matter", "TestPRCheckout_urlArg", "TestIssueView_urlArg", "TestIssueCreate_web", "TestPRCheckout_existingBranch", "TestIssueCreate_disabledIssues", "TestFind/Template_in_root", "TestCompletion_unsupported", "TestPRCreate", "Test_Translator", "TestPRList_filteringAssignee", "TestExtractContents/No_front-matter", "TestPRCheckout_differentRepo_currentBranch", "TestCheckForUpdate/latest_is_older", "TestIssueList", "TestPRCheckout_maintainerCanModify", "TestPRView_numberArg", "TestPRView_noResultsForBranch", "Test_printError", "TestPRStatus", "Test_printError/unknown_Cobra_command_error", "TestPrCreateHelperProcess", "TestForOS/macOS", "TestForOS/Linux", "Test_repoFromURL", "TestPRCreate_cross_repo_same_branch", "Test_parseRemotes", "TestIssueView_notFound", "TestIssueStatus_blankSlate", "TestIssueList_nullAssigneeLabels", "TestCheckForUpdate/latest_is_newer"], "failed_tests": ["github.com/cli/cli/context", "Test_ttyTablePrinter_truncate", "github.com/cli/cli/utils"], "skipped_tests": []}
{"passed_count": 91, "failed_count": 1, "skipped_count": 0, "passed_tests": ["TestExtractName/Incomplete_front-matter", "TestPullRequest_ChecksStatus", "TestPRView_urlArg", "TestCompletion_fish", "TestPRView_branchArg", "TestReplaceExcessiveWhitespace", "TestFind/Multiple_templates", "TestFind", "TestPRStatus_reviewsAndChecks", "TestChangelogURL", "TestCheckForUpdate", "TestPRView_previewCurrentBranch", "TestGraphQL", "TestPRStatus_blankSlate", "TestPRView_branchWithOwnerArg", "TestCompletion_bash", "TestExtractName/No_front-matter", "Test_printError/Cobra_flag_error", "TestCompletion_zsh", "TestForOS", "TestIssueView_previewWithEmptyBody", "Test_UncommittedChangeCount", "Test_ttyTablePrinter_truncate", "Test_printError/DNS_error", "TestIssueStatus", "TestFind/Template_in_docs", "TestExtractContents", "TestFind/Template_in_.github_takes_precedence", "Test_printError/generic_error", "TestPRCheckout_sameRepo", "TestIssueList_disabledIssues", "TestPRList_filteringAssigneeLabels", "TestPRView_currentBranch", "TestIssueList_withFlags", "TestExtractContents/Has_front-matter", "TestPRView_previewCurrentBranchWithEmptyBody", "TestPRView_preview", "TestIssueView_disabledIssues", "TestCheckForUpdate/latest_is_current", "TestPRCreate_web", "TestPRCheckout_branchArg", "TestPRCheckout_differentRepo", "TestPRList_filtering", "Test_repoFromURL_invalid", "TestIssueView_preview", "TestPRCheckout_differentRepo_existingBranch", "Test_sshParse", "TestCheckForUpdate/current_is_prerelease", "TestGitStatusHelperProcess", "TestIssueStatus_disabledIssues", "TestIssueCreate", "TestIssueView", "TestGraphQLError", "TestFind/Empty_multiple_templates_directory", "TestExtractName", "TestForOS/Windows", "TestFuzzyAgo", "TestPRList", "TestPRCheckout_differentRepo_remoteExists", "TestPRCreate_ReportsUncommittedChanges", "TestExtractName/Complete_front-matter", "TestPRCheckout_urlArg", "TestIssueView_urlArg", "TestIssueCreate_web", "TestPRCheckout_existingBranch", "TestIssueCreate_disabledIssues", "TestFind/Template_in_root", "TestCompletion_unsupported", "TestPRCreate", "Test_Translator", "TestPRList_filteringAssignee", "TestExtractContents/No_front-matter", "TestPRCheckout_differentRepo_currentBranch", "TestCheckForUpdate/latest_is_older", "TestIssueList", "TestPRCheckout_maintainerCanModify", "TestPRView_numberArg", "TestPRView_noResultsForBranch", "Test_printError", "TestPRStatus", "Test_printError/unknown_Cobra_command_error", "TestPrCreateHelperProcess", "TestForOS/macOS", "TestForOS/Linux", "Test_repoFromURL", "TestPRCreate_cross_repo_same_branch", "Test_parseRemotes", "TestIssueView_notFound", "TestIssueStatus_blankSlate", "TestIssueList_nullAssigneeLabels", "TestCheckForUpdate/latest_is_newer"], "failed_tests": ["github.com/cli/cli/context"], "skipped_tests": []}