branch: master commit b8b951b205cd7def439bc6a37bba6f3abf24291d Author: Chunyang Xu <xuchunyan...@gmail.com> Commit: Chunyang Xu <xuchunyan...@gmail.com>
Allow ivy-count-format to be set as nil --- ivy.el | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/ivy.el b/ivy.el index 55005de..faa469b 100644 --- a/ivy.el +++ b/ivy.el @@ -72,7 +72,7 @@ Set this to nil if you don't want the count. You can also set it to e.g. \"(%d/%d) \" if you want to see both the candidate index and the candidate count." - :type 'string) + :type '(choice (const :tag "Count disabled" nil) string)) (defcustom ivy-wrap nil "Whether to wrap around after the first and last candidate." @@ -993,6 +993,8 @@ This is useful for recursive `ivy-read'." (setq ivy--prompt (cond ((string-match "%.*d" prompt) prompt) + ((null ivy-count-format) + nil) ((string-match "%d.*%d" ivy-count-format) (let ((w (length (number-to-string (length ivy--all-candidates))))