summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <public@thanosapollo.org>2026-04-27 20:18:13 +0300
committerThanos Apollo <public@thanosapollo.org>2026-04-27 20:18:13 +0300
commit4ffa637cb55119305c7a897dabe7e4e475d38cc8 (patch)
tree7eb21dcfb60017c4279376cb5195a164706bee64
parente1cce9a2bc5494424630d3e34423c9e528353c4f (diff)
cleanup: use string-pad, drop keymap-popup--pad-line
-rw-r--r--keymap-popup.el8
1 files changed, 1 insertions, 7 deletions
diff --git a/keymap-popup.el b/keymap-popup.el
index 0f83936..89c4fe7 100644
--- a/keymap-popup.el
+++ b/keymap-popup.el
@@ -487,12 +487,6 @@ rendered with the inapt face."
"Return the visible width of STR, ignoring text properties."
(string-width (substring-no-properties str)))
-(defun keymap-popup--pad-line (line width)
- "Pad LINE with spaces to WIDTH (based on visible characters)."
- (let ((visible-width (keymap-popup--string-width-visible line)))
- (if (< visible-width width)
- (concat line (make-string (- width visible-width) ?\s))
- line)))
(defun keymap-popup--column-width (col)
"Return the max visible width of lines in COL."
@@ -507,7 +501,7 @@ Shorter columns are padded with blank lines."
(padded-cols (cl-mapcar
(lambda (col width)
(let ((padded (mapcar (lambda (line)
- (keymap-popup--pad-line line width))
+ (string-pad line width))
col))
(blanks (make-list (- max-height (length col))
(make-string width ?\s))))