Parcourir la source

org-table: Fix table alignment

* lisp/org-table.el (org-table-align): Fix table alignment.
Nicolas Goaziou il y a 7 ans
Parent
commit
a65ddb0228
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      lisp/org-table.el

+ 2 - 2
lisp/org-table.el

@@ -809,7 +809,7 @@ When nil, simply write \"#ERROR\" in corrupted fields.")
              ;; Find fields that are wider than FMAX, and shorten them.
              (when fmax
                (dolist (x column)
-                 (when (> (org-string-width x) fmax)
+                 (when (> (string-width x) fmax)
                    (org-add-props x nil
                      'help-echo
                      (concat
@@ -837,7 +837,7 @@ edit.  Full value is:\n"
                       (list 'display org-narrow-column-arrow)
                       x))))))
            ;; Get the maximum width for each column
-           (push (apply #'max (or fmax 1) 1 (mapcar #'org-string-width column))
+           (push (or fmax (apply #'max 1 (mapcar #'org-string-width column)))
                  lengths)
            ;; Get the fraction of numbers among non-empty cells to
            ;; decide about alignment of the column.