mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-26 06:39:43 +03:00
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:
parent
13c5bcb4d8
commit
167c93b85c
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user