diff options
author | Michael Muré <batolettre@gmail.com> | 2018-12-23 20:13:14 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2018-12-23 20:13:14 +0100 |
commit | 261aa61711639cf98a9aa987e86377d520b8c868 (patch) | |
tree | 7466fb4dd6cb3a64e4a3d9819859e488ffb8066e /termui/show_bug.go | |
parent | f9fc85ac825fec05a26d4029da15b33ae66e4e25 (diff) | |
download | git-bug-261aa61711639cf98a9aa987e86377d520b8c868.tar.gz |
text: fix a wrapping bug leading to line longer than they should
Diffstat (limited to 'termui/show_bug.go')
-rw-r--r-- | termui/show_bug.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/termui/show_bug.go b/termui/show_bug.go index a16626a4..cb2fe04c 100644 --- a/termui/show_bug.go +++ b/termui/show_bug.go @@ -241,7 +241,7 @@ func (sb *showBug) renderMain(g *gocui.Gui, mainView *gocui.View) error { case *bug.CreateTimelineItem: create := op.(*bug.CreateTimelineItem) - content, lines := text.WrapLeftPadded(create.Message, maxX, 4) + content, lines := text.WrapLeftPadded(create.Message, maxX-1, 4) v, err := sb.createOpView(g, viewName, x0, y0, maxX+1, lines, true) if err != nil { @@ -258,7 +258,7 @@ func (sb *showBug) renderMain(g *gocui.Gui, mainView *gocui.View) error { edited = " (edited)" } - message, _ := text.WrapLeftPadded(comment.Message, maxX, 4) + message, _ := text.WrapLeftPadded(comment.Message, maxX-1, 4) content := fmt.Sprintf("%s commented on %s%s\n\n%s", colors.Magenta(comment.Author.DisplayName()), comment.CreatedAt.Time().Format(timeLayout), |