justify: do not take an empty line as template for first-line indentation

This fixes https://savannah.gnu.org/bugs/?57437.
master
Benno Schulenberg 2020-03-10 10:56:05 +01:00
parent dad2b5541e
commit 9d499c769b
1 changed files with 4 additions and 0 deletions

View File

@ -1789,6 +1789,10 @@ void do_justify(bool full_justify)
while (sampleline->prev && inpar(sampleline) && !begpar(sampleline, 0))
sampleline = sampleline->prev;
/* Ignore lines that contain no text. */
while (sampleline->next && !inpar(sampleline))
sampleline = sampleline->next;
/* Store the leading part that is to be used for the new paragraph. */
quot_len = quote_length(sampleline->data);
lead_len = quot_len + indent_length(sampleline->data + quot_len);