justify: skip over in-line whitespace only, not over leading whitespace

This fixes https://savannah.gnu.org/bugs/?58028.

Bug existed since commit 107abd26 from yesterday.
master
Benno Schulenberg 2020-03-23 11:00:17 +01:00
parent 34d38fe1c6
commit 6866ea0d0e
1 changed files with 2 additions and 2 deletions

View File

@ -1772,8 +1772,8 @@ void do_justify(bool full_justify)
if (0 < end_x && end_x < fore_len)
end_x = fore_len;
/* Advance over blanks after the region. */
while (is_blank_char(&endline->data[end_x]))
/* When not at the left edge, advance over blanks after the region. */
while (end_x > 0 && is_blank_char(&endline->data[end_x]))
end_x = step_right(endline->data, end_x);
sampleline = startline;