mirror of git://git.sv.gnu.org/nano.git
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.
This commit is contained in:
parent
551a971e16
commit
c8a87b4d2a
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue