[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra cbcb7ad 034/395: swiper.el (swiper-isearch-fo
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra cbcb7ad 034/395: swiper.el (swiper-isearch-format-function): Refactor |
Date: |
Thu, 25 Feb 2021 08:31:25 -0500 (EST) |
branch: externals/ivy-hydra
commit cbcb7ad93dff786fc3734a73f055db9d2e967aa4
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
swiper.el (swiper-isearch-format-function): Refactor
Re #2317
---
ivy-test.el | 15 +++++++--------
swiper.el | 19 ++++++++++++-------
2 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/ivy-test.el b/ivy-test.el
index c15cf2f..fd0b362 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -1321,14 +1321,13 @@ a buffer visiting a file."
(len (length cands)))
(should (equal cands '(3 9 15 20 25 30 35)))
(dotimes (index len)
- (should (string= (substring-no-properties
- (swiper--isearch-format
- index len
- cands
- input
- (nth index cands)
- (current-buffer)))
- "line0\nline1\nline line\nline line\nline5"))))))
+ (should (equal (swiper--isearch-format
+ index len
+ cands
+ input
+ (nth index cands)
+ (current-buffer))
+ '("line0" "line1" "line line" "line line" "line5")))))))
(ert-deftest ivy-use-selectable-prompt ()
(let ((ivy-use-selectable-prompt t)
diff --git a/swiper.el b/swiper.el
index 3e2ecb8..eae89be 100644
--- a/swiper.el
+++ b/swiper.el
@@ -1534,12 +1534,17 @@ When not running `swiper-isearch' already, start it."
(if (numberp (car-safe cands))
(if (string= ivy--old-re "^$")
""
- (swiper--isearch-format
- ivy--index ivy--length ivy--old-cands
- ivy--old-re
- (ivy-state-current ivy-last)
- (ivy-state-buffer ivy-last)))
- (ivy-format-function-default cands)))
+ (mapconcat
+ #'identity
+ (swiper--isearch-format
+ ivy--index ivy--length ivy--old-cands
+ ivy--old-re
+ (ivy-state-current ivy-last)
+ (ivy-state-buffer ivy-last))
+ "\n"))
+ (funcall
+ (ivy-alist-setting ivy-format-functions-alist t)
+ cands)))
(defun swiper--line-at-point (pt)
(save-excursion
@@ -1611,7 +1616,7 @@ When not running `swiper-isearch' already, start it."
(push (swiper--isearch-highlight s) res)
(cl-incf len))
(cl-incf i))
- (mapconcat #'identity (nreverse res) "\n"))))
+ (nreverse res))))
;;;###autoload
(defun swiper-isearch (&optional initial-input)
- [elpa] externals/ivy-hydra 0ecc41c 240/395: * ivy.el (ivy-occur-next-error): Use dolist., (continued)
- [elpa] externals/ivy-hydra 0ecc41c 240/395: * ivy.el (ivy-occur-next-error): Use dolist., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ec16352 253/395: ivy.el (ivy-resume): Check that :action is not identity, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f3f4c8c 246/395: Fix ivy-auto-shrink-minibuffer regression, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 57c7d7c 259/395: Call actions with default-directory bound to last state dir, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 92e5a95 252/395: Add command counsel-describe-symbol, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 16d391d 263/395: ivy.el (ivy--done): Handle ivy-text being a full path when on remote, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ce5b20a 283/395: counsel.el (counsel-grep-like-occur): Fix for a list arg, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra db5a894 327/395: ivy-test.el (ivy-with): Don't use counsel-locate-git-root, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 0b5c08a 308/395: counsel.el (counsel-grep-like-occur): Fix copy-sequence for cl-mapcan, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra aef1d4d 302/395: ivy.el (ivy-configure): Add :parent keyword, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra cbcb7ad 034/395: swiper.el (swiper-isearch-format-function): Refactor,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 388e0d4 043/395: ivy.el (ivy--magic-tilde-directory): Fix for non-standard home path, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 5e393b0 047/395: .travis.yml (env): Bump to emacs-26.3-travis, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 2d4d6d6 076/395: Use text, not "current", in -dispatching-done when no matches, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 8c23823 073/395: ivy-test.el (ivy-swiper-wgrep): Re-enable on 24.5, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 9e7f21a 078/395: ivy.el (ivy-completing-read): Fix require-match arg being symbol, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 3c6e5da 091/395: Remove counsel--grep-mode-occur, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e22c8df 103/395: counsel.el (counsel-git-cands): Avoid an extra call to counsel-git-root, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 044f82c 106/395: ivy.el (ivy-set-text): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 0a08436 169/395: ivy.el (ivy--set-candidates): Delete duplicates only for extra sources, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 22422dd 219/395: counsel.el (counsel-fonts): Add a custom transformer with font sample, Basil L. Contovounesios, 2021/02/25