mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-29 08:03:19 +03:00
minibar: do not falsely report that a new, empty file is in Mac format
The 'openfile->fmt' element gets initialized to 'UNSPECIFIED',
so the code has to take that possibility into account.
This fixes https://savannah.gnu.org/bugs/?65676.
Bug existed since version 8.0, commit fe4f74f6
.
This commit is contained in:
parent
33eaf3e947
commit
e9c7dfa992
@ -2213,7 +2213,7 @@ void minibar(void)
|
|||||||
size_t count = openfile->filebot->lineno - (openfile->filebot->data[0] == '\0');
|
size_t count = openfile->filebot->lineno - (openfile->filebot->data[0] == '\0');
|
||||||
|
|
||||||
number_of_lines = nmalloc(49);
|
number_of_lines = nmalloc(49);
|
||||||
if (openfile->fmt == NIX_FILE)
|
if (openfile->fmt == NIX_FILE || openfile->fmt == UNSPECIFIED)
|
||||||
sprintf(number_of_lines, P_(" (%zu line)", " (%zu lines)", count), count);
|
sprintf(number_of_lines, P_(" (%zu line)", " (%zu lines)", count), count);
|
||||||
else
|
else
|
||||||
sprintf(number_of_lines, P_(" (%zu line, %s)", " (%zu lines, %s)", count),
|
sprintf(number_of_lines, P_(" (%zu line, %s)", " (%zu lines, %s)", count),
|
||||||
|
Loading…
Reference in New Issue
Block a user