]> Sergey Matveev's repositories - nnn.git/commitdiff
Use 'ap' for apparent
authorArun Prakash Jana <engineerarun@gmail.com>
Mon, 8 Oct 2018 01:06:55 +0000 (06:36 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Mon, 8 Oct 2018 01:06:55 +0000 (06:36 +0530)
nnn.c

diff --git a/nnn.c b/nnn.c
index 82c4b42b39f695c02acfd9595950041cfb0d6807..baed24768303e60325bddf03443bfbaea2bff19e 100644 (file)
--- a/nnn.c
+++ b/nnn.c
@@ -2432,7 +2432,14 @@ redraw(char *path)
                                snprintf(buf, NAME_MAX + 65, "%d/%d %s[%s%s]",
                                         cur + 1, ndents, sort, unescape(dents[cur].name, 0), get_file_sym(dents[cur].mode));
                        else {
-                               i = snprintf(buf, 64, "%d/%d du: %s (%lu files) ", cur + 1, ndents, coolsize(dir_blocks << 9), num_files);
+                               i = snprintf(buf, 64, "%d/%d ", cur + 1, ndents);
+
+                               if (cfg.apparentsz)
+                                       buf[i++] = 'a', buf[i++] = 'p';
+                               else
+                                       buf[i++] = 'd', buf[i++] = 'u';
+
+                               i += snprintf(buf + i, 64, ": %s (%lu files) ", coolsize(dir_blocks << BLK_SHIFT), num_files);
                                snprintf(buf + i, NAME_MAX, "vol: %s free [%s%s]",
                                         coolsize(get_fs_info(path, FREE)), unescape(dents[cur].name, 0), get_file_sym(dents[cur].mode));
                        }