files: add the file format on the status bar when switching buffers

Suggested-by: Brand Huntsman <alpha@qzx.com>
master
Benno Schulenberg 2018-07-13 11:15:48 +02:00
parent 063a8b0870
commit f598a4f12d
1 changed files with 10 additions and 2 deletions

View File

@ -590,7 +590,15 @@ void mention_name_and_linecount(void)
{
size_t count = openfile->filebot->lineno -
(openfile->filebot->data[0] == '\0' ? 1 : 0);
#ifndef NANO_TINY
if (openfile->fmt != NIX_FILE)
/* TRANSLATORS: first %s is the file name, second %s a format indicator. */
statusline(HUSH, P_("%s -- %zu line (%s)", "%s -- %zu lines (%s)", count),
openfile->filename[0] == '\0' ?
_("New Buffer") : tail(openfile->filename), count,
openfile->fmt == DOS_FILE ? _("DOS") : _("Mac"));
else
#endif
statusline(HUSH, P_("%s -- %zu line", "%s -- %zu lines", count),
openfile->filename[0] == '\0' ?
_("New Buffer") : tail(openfile->filename), count);