commit 9d3d354bd492a6f3e01bacfcf688d3bfb743ef9a
parent 51a5f33b5b5da457bc3b8536d1545d613100528d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 19 Nov 2021 17:02:21 +0100
feedback: report the number of inserted lines also with --zero or --mini
Inserting another file is somewhat unusual -- it's better to give
feedback about it.
This fixes https://savannah.gnu.org/bugs/?61509.
Bug existed since version 5.5, since the minibar was introduced.
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/files.c b/src/files.c
@@ -819,10 +819,12 @@ 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(ZERO))
- statusline(HUSH, P_("Read %zu line", "Read %zu lines",
+ else if ((!ISSET(MINIBAR) && !ISSET(ZERO)) || we_are_running)
+ statusline(REMARK, P_("Read %zu line", "Read %zu lines",
num_lines), num_lines);
+ report_size = TRUE;
+
/* If we inserted less than a screenful, don't center the cursor. */
if (undoable && less_than_a_screenful(was_lineno, was_leftedge))
focusing = FALSE;
@@ -898,7 +900,7 @@ int open_file(const char *filename, bool new_one, FILE **f)
statusline(ALERT, _("Error reading %s: %s"), filename, strerror(errno));
close(fd);
fd = -1;
- } else if (!ISSET(ZERO))
+ } else if (!ISSET(ZERO) || we_are_running)
statusbar(_("Reading..."));
}