[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/taxy-magit-section 1b8a51db0b 3/4: Fix: (taxy-magit-sec
From: |
ELPA Syncer |
Subject: |
[elpa] externals/taxy-magit-section 1b8a51db0b 3/4: Fix: (taxy-magit-section-format-items) Column header as min width |
Date: |
Tue, 29 Mar 2022 11:57:45 -0400 (EDT) |
branch: externals/taxy-magit-section
commit 1b8a51db0b22193839444d718b6524b8b7a43c53
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Fix: (taxy-magit-section-format-items) Column header as min width
---
README.org | 1 +
taxy-magit-section.el | 2 +-
taxy-magit-section.info | 11 +++++++----
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/README.org b/README.org
index 802acade6c..d3c9a82518 100644
--- a/README.org
+++ b/README.org
@@ -36,6 +36,7 @@ This library renders
[[https://github.com/alphapapa/taxy.el][Taxy]] structs with
*Fixes*
+ =taxy-magit-section-insert= appends heading faces, so users can override
(or merge with) the default.
++ =taxy-magit-section-format-items= uses columns' headers as their minimum
width, which preserves each column's width regardless of items' values.
** 0.9
diff --git a/taxy-magit-section.el b/taxy-magit-section.el
index 3474d70b88..18863306a3 100644
--- a/taxy-magit-section.el
+++ b/taxy-magit-section.el
@@ -365,7 +365,7 @@ the items' values for each column."
(let* ((column-alist (alist-get column-name formatters nil
nil #'equal))
(fn (alist-get 'formatter column-alist))
(value (funcall fn item depth))
- (current-column-size (or (map-elt column-sizes
column-name) 0)))
+ (current-column-size (or (map-elt column-sizes
column-name) (string-width column-name))))
(setf (map-elt column-sizes column-name)
(max current-column-size (string-width* value)))
(setf (map-elt column-aligns column-name)
diff --git a/taxy-magit-section.info b/taxy-magit-section.info
index fcc905801f..bd41044169 100644
--- a/taxy-magit-section.info
+++ b/taxy-magit-section.info
@@ -78,6 +78,9 @@ File: README.info, Node: 091, Next: 09, Up: Changelog
*Fixes*
• ‘taxy-magit-section-insert’ appends heading faces, so users can
override (or merge with) the default.
+ • ‘taxy-magit-section-format-items’ uses columns’ headers as their
+ minimum width, which preserves each column’s width regardless of
+ items’ values.
File: README.info, Node: 09, Prev: 091, Up: Changelog
@@ -123,10 +126,10 @@ Node: Installation902
Node: COMMENT Usage1273
Node: Changelog1398
Node: 0911551
-Node: 091759
-Node: Development1949
-Node: Credits2176
-Node: License2366
+Node: 091931
+Node: Development2121
+Node: Credits2348
+Node: License2538
End Tag Table