justify: skip over blanks after the region, to not skew the indentation

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

Bug existed since commit 3225c71e from six days ago.
master
Benno Schulenberg 2020-03-22 16:56:50 +01:00
parent f528ced22b
commit 107abd2654
1 changed files with 4 additions and 0 deletions

View File

@ -1772,6 +1772,10 @@ void do_justify(bool full_justify)
if (0 < end_x && end_x < fore_len) if (0 < end_x && end_x < fore_len)
end_x = fore_len; end_x = fore_len;
/* Advance over blanks after the region. */
while (is_blank_char(&endline->data[end_x]))
end_x++;
sampleline = startline; sampleline = startline;
/* Find the first line of the paragraph in which the region starts. */ /* Find the first line of the paragraph in which the region starts. */