From 9642dc899458daedc0d225e542a825baca58ea3c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Nov 2005 11:38:23 +0000 Subject: (ls-lisp-format-file-size): Format file size with 9 digits, not 8, to avoid misalignment for files larger than 100MB. --- lisp/ls-lisp.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/ls-lisp.el') diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index feadbb5e2be..5f5a53b0df0 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -588,11 +588,11 @@ All ls time options, namely c, t and u, are handled." (defun ls-lisp-format-file-size (file-size human-readable) (if (or (not human-readable) (< file-size 1024)) - (format (if (floatp file-size) " %8.0f" " %8d") file-size) + (format (if (floatp file-size) " %9.0f" " %9d") file-size) (do ((file-size (/ file-size 1024.0) (/ file-size 1024.0)) ;; kilo, mega, giga, tera, peta, exa (post-fixes (list "k" "M" "G" "T" "P" "E") (cdr post-fixes))) - ((< file-size 1024) (format " %7.0f%s" file-size (car post-fixes)))))) + ((< file-size 1024) (format " %8.0f%s" file-size (car post-fixes)))))) (provide 'ls-lisp) -- cgit v1.2.1