aboutsummaryrefslogtreecommitdiffstats
path: root/util/text/text.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-12-23 20:13:14 +0100
committerMichael Muré <batolettre@gmail.com>2018-12-23 20:13:14 +0100
commit261aa61711639cf98a9aa987e86377d520b8c868 (patch)
tree7466fb4dd6cb3a64e4a3d9819859e488ffb8066e /util/text/text.go
parentf9fc85ac825fec05a26d4029da15b33ae66e4e25 (diff)
downloadgit-bug-261aa61711639cf98a9aa987e86377d520b8c868.tar.gz
text: fix a wrapping bug leading to line longer than they should
Diffstat (limited to 'util/text/text.go')
-rw-r--r--util/text/text.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/text/text.go b/util/text/text.go
index 443728aa..b41b892b 100644
--- a/util/text/text.go
+++ b/util/text/text.go
@@ -84,7 +84,7 @@ func WrapLeftPadded(text string, lineWidth int, leftPad int) (string, int) {
lineBuffer.Reset()
lineBuffer.WriteString(word)
firstWord = false
- spaceLeft = lineWidth - wordLength
+ spaceLeft = lineWidth - leftPad - wordLength
nbLine++
}
}