commit 167c93b85ca43da6c52bbc11522ddab5582197e4
parent 13c5bcb4d8186049d66795db5df411cffe2bacfc
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 7 Nov 2021 15:15:35 +0100
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/text.c b/src/text.c
@@ -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. */