mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
Fixed line width when displaying 100%
Which would happen if there's only one file is in a directory
This commit is contained in:
parent
2d1060709b
commit
95b314de73
2 changed files with 5 additions and 5 deletions
|
|
@ -9,6 +9,7 @@ git - ?
|
||||||
- Correctly handle paths longer than PATH_MAX
|
- Correctly handle paths longer than PATH_MAX
|
||||||
- Fixed various bugs related to rpath()
|
- Fixed various bugs related to rpath()
|
||||||
- Major code rewrite
|
- Major code rewrite
|
||||||
|
- Fixed line width when displaying 100%
|
||||||
|
|
||||||
1.4 - 2008-09-10
|
1.4 - 2008-09-10
|
||||||
- Removed the startup window
|
- Removed the startup window
|
||||||
|
|
@ -16,8 +17,7 @@ git - ?
|
||||||
be hidden with the 'h'-key
|
be hidden with the 'h'-key
|
||||||
- Fixed buffer overflow when supplying a path longer
|
- Fixed buffer overflow when supplying a path longer
|
||||||
than PATH_MAX (patch by Tobias Stoeckmann)
|
than PATH_MAX (patch by Tobias Stoeckmann)
|
||||||
- Used S_BLKSIZE instead of a hardcoded block size of
|
- Used S_BLKSIZE instead of a hardcoded block size of 512
|
||||||
512
|
|
||||||
- Fixed display of disk usage and apparent sizes
|
- Fixed display of disk usage and apparent sizes
|
||||||
- Updated ncdu -h
|
- Updated ncdu -h
|
||||||
- Included patches for Cygwin
|
- Included patches for Cygwin
|
||||||
|
|
|
||||||
|
|
@ -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));
|
mvprintw(row, 0, line, ct, size, gr, dt, cropstr(n->name, wincols-24));
|
||||||
break;
|
break;
|
||||||
case 2:
|
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));
|
mvprintw(row, 0, line, ct, size, pc, dt, cropstr(n->name, wincols-19));
|
||||||
break;
|
break;
|
||||||
case 3:
|
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));
|
mvprintw(row, 0, line, ct, size, pc, gr, dt, cropstr(n->name, wincols-30));
|
||||||
}
|
}
|
||||||
free(line);
|
free(line);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue