diff options
| -rw-r--r-- | ui.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -215,8 +215,9 @@ func formatDefinitionForDisplay(policy bluemonday.Policy, definition string, max str = strings.ReplaceAll(str, "\t- ", "\x1b[0;33;49m•\x1b[0m ") // Limit the width of the displayed definition to 80 characters, or the - // width of the viewport (whichever is smaller). - width := min(maxWidth, 80) + // width of the viewport (whichever is smaller). (Add one character of + // padding too -- seems to prevent weird line breaks) + width := min(maxWidth-1, 80-1) return wordwrap.String(str, width) } |
