From f598a4f12ddff991154b00a284096601877a8d3a Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 13 Jul 2018 11:15:48 +0200 Subject: [PATCH] files: add the file format on the status bar when switching buffers Suggested-by: Brand Huntsman --- src/files.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/files.c b/src/files.c index 39f4c2d8..1219d3f7 100644 --- a/src/files.c +++ b/src/files.c @@ -590,8 +590,16 @@ void mention_name_and_linecount(void) { size_t count = openfile->filebot->lineno - (openfile->filebot->data[0] == '\0' ? 1 : 0); - - statusline(HUSH, P_("%s -- %zu line", "%s -- %zu lines", count), +#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); }