1
1

justify: correctly compute the number of lines to take, to avoid a crash

When the file starts with one or more blank lines, the first paragraph
doesn't start on line 1.

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

Bug existed since version 4.0, commit ac8bd2a2.
Этот коммит содержится в:
Benno Schulenberg 2019-04-11 15:25:44 +02:00
родитель 98cc39e8e5
Коммит d83a8eb359

Просмотреть файл

@ -2070,7 +2070,7 @@ void do_justify(bool full_justify)
/* Set the number of lines to be pulled into the cutbuffer. */
if (full_justify)
jus_len = openfile->filebot->lineno;
jus_len = openfile->filebot->lineno - first_par_line->lineno + 1;
else
jus_len = par_len;