emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/vertico 72ede60 4/5: Revert "vertico-count-format: Bett


From: ELPA Syncer
Subject: [elpa] externals/vertico 72ede60 4/5: Revert "vertico-count-format: Better count formatting using display alignment"
Date: Fri, 9 Jul 2021 23:57:20 -0400 (EDT)

branch: externals/vertico
commit 72ede60cff33e0a02cc867fbf687eb1c5088c07b
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Revert "vertico-count-format: Better count formatting using display 
alignment"
    
    This reverts commit 81539b89aa4ebbcfd5651aff8dbd73b29d268aba.
---
 vertico.el | 22 ++++++++--------------
 1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/vertico.el b/vertico.el
index 80d8735..bff75a1 100644
--- a/vertico.el
+++ b/vertico.el
@@ -42,10 +42,9 @@
   :group 'convenience
   :prefix "vertico-")
 
-(defcustom vertico-count-format
-  '(7 "%s/%s ")
+(defcustom vertico-count-format (cons "%-6s " "%s/%s")
   "Format string used for the candidate count."
-  :type '(choice (const nil) (list integer string)))
+  :type '(choice (const nil) (cons string string)))
 
 (defcustom vertico-group-format
   (concat
@@ -493,17 +492,12 @@ See `resize-mini-windows' for documentation."
 
 (defun vertico--format-count ()
   "Format the count string."
-  (when (stringp (car vertico-count-format))
-    (message "Deprecated `vertico-count-format' configuration.")
-    (setq vertico-count-format `(7 "%s/%s")))
-  (concat
-   (format (cadr vertico-count-format)
-           (cond ((>= vertico--index 0) (1+ vertico--index))
-                 ((vertico--allow-prompt-selection-p) "*")
-                 (t "!"))
-           vertico--total)
-   (propertize " " 'display
-               `(space :align-to (+ left ,(car vertico-count-format))))))
+  (format (car vertico-count-format)
+          (format (cdr vertico-count-format)
+                  (cond ((>= vertico--index 0) (1+ vertico--index))
+                        ((vertico--allow-prompt-selection-p) "*")
+                        (t "!"))
+                  vertico--total)))
 
 (defun vertico--display-count ()
   "Update count overlay `vertico--count-ov'."



reply via email to

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