feedback: suppress format-conversion messages for --zero and --mini
A "Read xx lines (converted from...)" message should be suppressed when --zero or --minibar are active (just like the normal "Read xx lines"), as otherwise it gets shown at a confusing moment when multiple files are opened at the same time. The message should get shown, however, when inserting a file into the current buffer. This fixes https://savannah.gnu.org/bugs/?65560. Bug existed since version 6.0, commit f147131e.
This commit is contained in:
parent
c3fc3ec73d
commit
2b335060b0
@ -830,6 +830,8 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable)
|
||||
|
||||
if (!writable)
|
||||
statusline(ALERT, _("File '%s' is unwritable"), filename);
|
||||
else if ((ISSET(ZERO) || ISSET(MINIBAR)) && !(we_are_running && undoable))
|
||||
; /* No blurb for new buffers with --zero or --mini. */
|
||||
#ifndef NANO_TINY
|
||||
else if (format == MAC_FILE)
|
||||
/* TRANSLATORS: Keep the next three messages at most 78 characters. */
|
||||
@ -841,7 +843,7 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable)
|
||||
"Read %zu lines (Converted from DOS format)",
|
||||
num_lines), num_lines);
|
||||
#endif
|
||||
else if ((!ISSET(MINIBAR) && !ISSET(ZERO)) || (we_are_running && undoable))
|
||||
else
|
||||
statusline(REMARK, P_("Read %zu line", "Read %zu lines",
|
||||
num_lines), num_lines);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user