nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit f598a4f12ddff991154b00a284096601877a8d3a
parent 063a8b087047e1eb6925700ef4e57083da74674d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Fri, 13 Jul 2018 11:15:48 +0200

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

Suggested-by: Brand Huntsman <alpha@qzx.com>

Diffstat:
Msrc/files.c | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git 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); }