diff --git a/src/text.c b/src/text.c index 2502e67c..a68ace54 100644 --- a/src/text.c +++ b/src/text.c @@ -1808,7 +1808,7 @@ void do_justify(bool full_justify) fore_length = quot_len + indent_length(endline->data + quot_len); /* When the region ends IN the lead, take the whole lead. */ - if (end_x < fore_length) + if (0 < end_x && end_x < fore_length) end_x = fore_length; /* Include preceding and subsequent whitespace into the marked region. */