commit | 4e64e4a4e2552194cf594243e23aa9baf3b4297e | [log] [tgz] |
---|---|---|
author | Jesse van den Kieboom <jessevdk@gmail.com> | Thu Dec 15 11:56:53 2016 +0100 |
committer | Jesse van den Kieboom <jessevdk@gmail.com> | Thu Dec 15 11:57:08 2016 +0100 |
tree | 4464d02e35c3983a0e885679cccd2cda5e0b0430 | |
parent | e9add2f5f616c4780b906a7d992ef1f24d1f8b44 [diff] |
Set a minimum length for wrapping text Fixes #199.
diff --git a/help.go b/help.go index 1b0c2c6..9167847 100644 --- a/help.go +++ b/help.go
@@ -107,6 +107,10 @@ func wrapText(s string, l int, prefix string) string { var ret string + if l < 10 { + l = 10 + } + // Basic text wrapping of s at spaces to fit in l lines := strings.Split(s, "\n")