]> git.eshelyaron.com Git - emacs.git/commitdiff
(eshell-ls-file): There are times with size-width is nil and
authorJohn Wiegley <johnw@newartisans.com>
Mon, 17 Nov 2003 00:24:06 +0000 (00:24 +0000)
committerJohn Wiegley <johnw@newartisans.com>
Mon, 17 Nov 2003 00:24:06 +0000 (00:24 +0000)
uncomputed (when directories are created in dired, for example); in
this case, 4 is reasonable default value, although it may caused
skewed new entries (which could be avoided by returning the original
value of 8 in all cases, but 99% of the time this is a waste of
whitespace).

lisp/eshell/em-ls.el

index 1d018026e67981a959298a72b9da4b19562edf6b..3b5252c18a13d27011474d44fb5f1e33d75ece72 100644 (file)
@@ -480,8 +480,8 @@ whose cdr is the list of file attributes."
                     ""))
                (let* ((str (eshell-ls-printable-size (nth 7 attrs)))
                       (len (length str)))
-                 (if (< len size-width)
-                     (concat (make-string (- size-width len) ? ) str)
+                 (if (< len (or size-width 4))
+                     (concat (make-string (- (or size-width 4) len) ? ) str)
                    str))
                " " (format-time-string
                     (concat