changeset 94580:9a020be031da

(ls-lisp-insert-directory): Use `string-width' instead of `length' for comparing length of user and group names.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 03 May 2008 10:27:21 +0000
parents dca2377770e7
children 742cb65ee6a5
files lisp/ls-lisp.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ls-lisp.el	Sat May 03 10:18:08 2008 +0000
+++ b/lisp/ls-lisp.el	Sat May 03 10:27:21 2008 +0000
@@ -329,9 +329,11 @@
 	  (dolist (elt file-alist)
 	    (setq attr (cdr elt)
 		  fuid (nth 2 attr)
-		  uid-len (length (if (stringp fuid) fuid (format "%d" fuid)))
+		  uid-len (if (stringp fuid) (string-width fuid)
+			    (length (format "%d" fuid)))
 		  fgid (nth 3 attr)
-		  gid-len (length (if (stringp fgid) fgid (format "%d" fgid)))
+		  gid-len (if (stringp fgid) (string-width fgid)
+			    (length (format "%d" fgid)))
 		  file-size (nth 7 attr))
 	    (if (> uid-len max-uid-len)
 		(setq max-uid-len uid-len))