From 4ffa637cb55119305c7a897dabe7e4e475d38cc8 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Mon, 27 Apr 2026 20:18:13 +0300 Subject: cleanup: use string-pad, drop keymap-popup--pad-line --- keymap-popup.el | 8 +------- 1 file changed, 1 insertion(+), 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)))) -- cgit v1.0