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
.
Этот коммит содержится в:
родитель
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;
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user