emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 2b97e83cc1 2/2: Fix off-by-one file size formatting in ls-lisp


From: Lars Ingebrigtsen
Subject: master 2b97e83cc1 2/2: Fix off-by-one file size formatting in ls-lisp
Date: Sat, 12 Feb 2022 02:08:26 -0500 (EST)

branch: master
commit 2b97e83cc1bffdaa923c9ebb877da2e25051e1a9
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix off-by-one file size formatting in ls-lisp
    
    * lisp/ls-lisp.el (ls-lisp-format, ls-lisp-format-file-size): The
    human-readable file sizes can be 7 characters wide (e.g.,
    "1016.1k") (bug#53937).
---
 lisp/ls-lisp.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index e7118a2a37..7a4be3c7e4 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -784,7 +784,7 @@ SWITCHES and TIME-INDEX give the full switch list and time 
data."
                ;; In GNU ls, -h affects the size in blocks, displayed
                ;; by -s, as well.
                (if (memq ?h switches)
-                   (format "%6s "
+                   (format "%7s "
                            (file-size-human-readable
                             ;; We use 1K as "block size", although
                             ;; most Windows volumes use 4KB to 8KB
@@ -881,7 +881,7 @@ All ls time options, namely c, t and u, are handled."
                  ls-lisp-filesize-f-fmt
                ls-lisp-filesize-d-fmt)
              file-size)
-    (format " %6s" (file-size-human-readable file-size))))
+    (format " %7s" (file-size-human-readable file-size))))
 
 (defun ls-lisp-unload-function ()
   "Unload ls-lisp library."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]