justify: correctly determine whether top-of-buffer has been reached

The text to be justified has been excised from the buffer and is now
in the cutbuffer, so we cannot compare any of its lines to 'filetop'.

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

Bug existed since version 4.0, commit 14c08589.
This commit is contained in:
Benno Schulenberg 2021-11-07 15:15:35 +01:00
parent 13c5bcb4d8
commit 167c93b85c

View File

@ -1467,7 +1467,7 @@ bool begpar(const linestruct *const line, int depth)
/* If this is the very first line of the buffer, it counts as a BOP
* even when it contains no text. */
if (line == openfile->filetop)
if (line->prev == NULL)
return TRUE;
/* If recursion is going too deep, just say it's not a BOP. */