diff options
author | Yorhel <git@yorhel.nl> | 2009-05-01 08:59:59 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-05-01 09:00:59 +0200 |
commit | 95b314de73664ddd08558e0d3bb243df656b74a9 (patch) | |
tree | 2a664a2f45faa1e8f4455a85ba1dfaf97231b3e1 | |
parent | 2d1060709b5da2a84563eb5ba3cc77090390b727 (diff) |
Fixed line width when displaying 100%
Which would happen if there's only one file is in a directory
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/browser.c | 4 |
2 files changed, 5 insertions, 5 deletions
@@ -9,6 +9,7 @@ git - ? - Correctly handle paths longer than PATH_MAX - Fixed various bugs related to rpath() - Major code rewrite + - Fixed line width when displaying 100% 1.4 - 2008-09-10 - Removed the startup window @@ -16,8 +17,7 @@ git - ? be hidden with the 'h'-key - Fixed buffer overflow when supplying a path longer than PATH_MAX (patch by Tobias Stoeckmann) - - Used S_BLKSIZE instead of a hardcoded block size of - 512 + - Used S_BLKSIZE instead of a hardcoded block size of 512 - Fixed display of disk usage and apparent sizes - Updated ncdu -h - Included patches for Cygwin @@ -72,7 +72,7 @@ git - ? required anymore (but highly recommended) - Added a warning for terminals smaller than 60x16 - Mountpoints (or any other directory pointing to - another filesystem) are now considered to be + another filesystem) are now considered to be directories rather than files. 0.1 - 2007-02-21 diff --git a/src/browser.c b/src/browser.c index 5869fe9..b353646 100644 --- a/src/browser.c +++ b/src/browser.c @@ -205,11 +205,11 @@ void browse_draw_item(struct dir *n, int row, off_t max, int ispar) { mvprintw(row, 0, line, ct, size, gr, dt, cropstr(n->name, wincols-24)); break; case 2: - sprintf(line, "%%c %%7s [%%4.1f%%%%] %%c%%-%ds", wincols-19); + sprintf(line, "%%c %%7s [%%5.1f%%%%] %%c%%-%ds", wincols-20); mvprintw(row, 0, line, ct, size, pc, dt, cropstr(n->name, wincols-19)); break; case 3: - sprintf(line, "%%c %%7s [%%4.1f%%%% %%10s] %%c%%-%ds", wincols-30); + sprintf(line, "%%c %%7s [%%5.1f%%%% %%10s] %%c%%-%ds", wincols-31); mvprintw(row, 0, line, ct, size, pc, gr, dt, cropstr(n->name, wincols-30)); } free(line); |