commit c8a87b4d2ab8d393b8c7a49ecddbf5af3e0ea594
parent 551a971e16a9694616542e3bfa14b81337549c90
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Tue, 4 Aug 2020 09:37:45 +0200
softwrap: initialize the 'extrarows' value for the magic line correctly
The make_new_node() function initializes 'extrarows' to a bad value
on purpose, to catch cases like this one where it doesn't get updated
properly.
This fixes https://savannah.gnu.org/bugs/?58890.
Reported-by: Jerry Kindall <kindall@gmail.com>
Bug existed since version 5.0, since the indicator was introduced.
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/utils.c b/src/utils.c
@@ -431,6 +431,9 @@ void new_magicline(void)
openfile->filebot->next = make_new_node(openfile->filebot);
openfile->filebot->next->data = copy_of("");
openfile->filebot = openfile->filebot->next;
+#ifndef NANO_TINY
+ openfile->filebot->extrarows = 0;
+#endif
openfile->totsize++;
}