Show directory size in ruler (#2343)

* Added dirSize to Size field and changed humanize function accordingly

* Seperated size into own fields and changed type to use pointers

* Added Documentation and Changelog
This commit is contained in:
SPFab authored and GitHub committed 2026-01-20 13:01:23 +11:00
1 parent b5d981ad4a
commit fa8e3788de
6 files changed
+22 -2

No files matched your search

+12
View File
@@ -999,11 +999,23 @@ func (ui *ui) drawRulerFile(nav *nav) {
curr := nav.currFile()
if curr != nil {
if curr.err == nil {
var dirsize *uint64 = nil
var dircount *uint64 = nil
if curr.dirSize >= 0 {
v := uint64(curr.dirSize)
dirsize = &v
}
if curr.dirCount >= 0 {
v := uint64(curr.dirCount)
dircount = &v
}
stat = &statData{
Path: curr.path,
Name: curr.Name(),
Extension: curr.ext,
Size: uint64(curr.Size()),
DirSize: dirsize,
DirCount: dircount,
Permissions: permString(curr.Mode()),
ModTime: curr.ModTime().Format(gOpts.timefmt),
AccessTime: curr.accessTime.Format(gOpts.timefmt),