[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 59c5f16 044/272: Special case empty ivy-count-format compl
From: |
Oleh Krehel |
Subject: |
[elpa] master 59c5f16 044/272: Special case empty ivy-count-format completion. |
Date: |
Mon, 25 Apr 2016 10:13:15 +0000 |
branch: master
commit 59c5f166eae1ff18c8bc7ce4a1286fb6162b9fee
Author: Stephen Whipple <address@hidden>
Commit: Oleh Krehel <address@hidden>
Special case empty ivy-count-format completion.
- Switch ivy-count-format test to empty string rather than nil.
- Since the prompt is based on user input, sanitize the prompt to
later be formatted, except in the case of empty ivy-count-format.
Fixes #349
---
ivy.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/ivy.el b/ivy.el
index 33c9017..96b04e0 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1412,10 +1412,14 @@ The previous string is between `ivy-completion-beg' and
`ivy-completion-end'."
(substring-no-properties
(car comps))))
(let* ((w (1+ (floor (log (length comps) 10))))
- (ivy-count-format (and ivy-count-format
- (format "%%-%dd " w))))
+ (ivy-count-format (if (string= ivy-count-format "")
+ ivy-count-format
+ (format "%%-%dd " w)))
+ (prompt (format "(%s): " str)))
(and
- (ivy-read (format "(%s): " str)
+ (ivy-read (if (string= ivy-count-format "")
+ prompt
+ (replace-regexp-in-string "%" "%%" prompt))
;; remove 'completions-first-difference face
(mapcar #'substring-no-properties comps)
:predicate predicate
- [elpa] master fdb21f6 033/272: counsel.el (counsel--async-sentinel): Re-display when no cands, (continued)
- [elpa] master fdb21f6 033/272: counsel.el (counsel--async-sentinel): Re-display when no cands, Oleh Krehel, 2016/04/25
- [elpa] master 1365b2b 031/272: Change tramp prompt from "Find File: " to "address@hidden: ", Oleh Krehel, 2016/04/25
- [elpa] master d1216eb 036/272: Add the '!' behavior into `ivy--regex-ignore-order', Oleh Krehel, 2016/04/25
- [elpa] master 66e00ed 034/272: counsel: Add counsel-up-directory to find-file-map, Oleh Krehel, 2016/04/25
- [elpa] master e23c175 039/272: Insert intermediate candidates during async completions, Oleh Krehel, 2016/04/25
- [elpa] master bc4d4a8 043/272: swiper.el (swiper-font-lock-exclude): Add sauron-mode, Oleh Krehel, 2016/04/25
- [elpa] master 93d1adc 026/272: Properly support matching ignoring order, Oleh Krehel, 2016/04/25
- [elpa] master 9a6b5fd 042/272: Add rcirc-mode to swiper-font-lock-ensure-exclude, Oleh Krehel, 2016/04/25
- [elpa] master ec7da3f 075/272: ivy.el (ivy-help-file): Improve location, Oleh Krehel, 2016/04/25
- [elpa] master c76c005 045/272: Add feedback for sole ivy completion., Oleh Krehel, 2016/04/25
- [elpa] master 59c5f16 044/272: Special case empty ivy-count-format completion.,
Oleh Krehel <=
- [elpa] master 569c11e 017/272: ivy.el (ivy-completion-in-region): Use compact ivy-count-format, Oleh Krehel, 2016/04/25
- [elpa] master d996215 038/272: Add counsel-descbinds, Oleh Krehel, 2016/04/25
- [elpa] master 9ef344d 062/272: use imenu API to jump to position. required by org-mode, Oleh Krehel, 2016/04/25
- [elpa] master 0a9780b 046/272: ivy.el (ivy--recompute-index): Update cl-position logic, Oleh Krehel, 2016/04/25
- [elpa] master 407ce2c 051/272: counsel.el (counsel-list-processes): New command, Oleh Krehel, 2016/04/25
- [elpa] master e3e1f51 052/272: ivy.el (ivy-ffap-url-functions): Customize "C-x C-f M-n", Oleh Krehel, 2016/04/25
- [elpa] master b39f409 056/272: counsel.el (counsel-unicode-char): Display hex codes in left column, Oleh Krehel, 2016/04/25
- [elpa] master eab714f 054/272: counsel.el (counsel-at-git-issue-p): New defun, Oleh Krehel, 2016/04/25
- [elpa] master 4696b89 057/272: ivy.el (ivy-switch-buffer-other-window): New command, Oleh Krehel, 2016/04/25
- [elpa] master 763d42b 048/272: Initialize `ivy-last` to empty state., Oleh Krehel, 2016/04/25