summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--WrapI18N.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/WrapI18N.pm b/WrapI18N.pm
index 6e5350b..4d9d73c 100644
--- a/WrapI18N.pm
+++ b/WrapI18N.pm
@@ -88,7 +88,7 @@ sub wrap {
$len = 0;
$text = $top2 . $text;
$word = ''; $wlen = 0;
- } elsif ($wlen + $w <= $columns) {
+ } elsif ($wlen + $w <= $columns - length ($top2)) {
# the current word is sent to next line
$out .= $separator;
$len = 0;