[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master dc7f5e0 012/184: swiper.el (swiper--isearch-function): Wor
From: |
Oleh Krehel |
Subject: |
[elpa] master dc7f5e0 012/184: swiper.el (swiper--isearch-function): Works for ivy--regex-ignore-order |
Date: |
Wed, 16 Oct 2019 13:14:40 -0400 (EDT) |
branch: master
commit dc7f5e0510e517e721983fc6c29b4ed67fdfba1f
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
swiper.el (swiper--isearch-function): Works for ivy--regex-ignore-order
Fixes #2155
---
swiper.el | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/swiper.el b/swiper.el
index ea3d145..b103abc 100644
--- a/swiper.el
+++ b/swiper.el
@@ -1338,11 +1338,26 @@ See `ivy-format-functions-alist' for further
information."
(let ((re-full (funcall ivy--regex-function str)))
(unless (equal re-full "")
(let* ((case-fold-search (ivy--case-fold-p str))
- (re (ivy-re-to-str re-full))
- (cands (swiper--isearch-function-1 re swiper--isearch-backward))
- (idx (swiper--isearch-next-item re cands)))
+ (re
+ (if (stringp re-full)
+ re-full
+ (regexp-opt (delq nil (mapcar (lambda (x) (and (cdr x) (car
x))) re-full)))))
+ (cands (swiper--isearch-function-1 re swiper--isearch-backward)))
+ (when (consp re-full)
+ (let (filtered-cands)
+ (dolist (re-cons re-full)
+ (save-excursion
+ (dolist (cand cands)
+ (goto-char cand)
+ (beginning-of-line)
+ (unless (if (re-search-forward (car re-cons)
(line-end-position) t)
+ (not (cdr re-cons))
+ (cdr re-cons))
+ (push cand filtered-cands))))
+ (setq cands (nreverse filtered-cands))
+ (setq filtered-cands nil))))
(setq ivy--old-re re)
- (ivy-set-index idx)
+ (ivy-set-index (swiper--isearch-next-item re cands))
(setq ivy--old-cands cands)))))
(defcustom swiper-isearch-highlight-delay '(2 0.2)
- [elpa] master updated (22e3e88 -> c2d3a4c), Oleh Krehel, 2019/10/16
- [elpa] master 196b4ea 001/184: doc/Makefile: Add target to install the info pages, Oleh Krehel, 2019/10/16
- [elpa] master 0a9fb0c 009/184: swiper.el (swiper--isearch-function): Refactor, Oleh Krehel, 2019/10/16
- [elpa] master f0ec850 005/184: swiper.el (swiper-isearch): Fix for ivy-resume, Oleh Krehel, 2019/10/16
- [elpa] master 2a036b8 002/184: swiper.el (swiper--isearch-function): Change., Oleh Krehel, 2019/10/16
- [elpa] master ad0f605 008/184: swiper.el (swiper--isearch-function-1): Extract, Oleh Krehel, 2019/10/16
- [elpa] master dc7f5e0 012/184: swiper.el (swiper--isearch-function): Works for ivy--regex-ignore-order,
Oleh Krehel <=
- [elpa] master 50ead7e 013/184: ivy-test.el (swiper-thing-at-point): Add and fix test, Oleh Krehel, 2019/10/16
- [elpa] master ec3e062 034/184: counsel (counsel-file-jump): Use temp buffer instead of split-string, Oleh Krehel, 2019/10/16
- [elpa] master 13be8ab 004/184: ivy.el (ivy--reset-state): Fix ivy-resume, Oleh Krehel, 2019/10/16
- [elpa] master 039353d 007/184: ivy.el (ivy--preselect-index): Fix ivy-resume for swiper-isearch, Oleh Krehel, 2019/10/16
- [elpa] master c7ffd06 016/184: swiper.el (swiper-isearch-action): Make ivy-previous-line-or-history work, Oleh Krehel, 2019/10/16
- [elpa] master b4c4a7f 011/184: swiper.el (swiper--isearch-next-item): Extract, Oleh Krehel, 2019/10/16
- [elpa] master b9f3e3b 017/184: swiper.el (swiper-isearch-action): Simplify, Oleh Krehel, 2019/10/16
- [elpa] master 38b5d83 015/184: swiper.el (swiper--isearch-filter-ignore-order): Extract, Oleh Krehel, 2019/10/16
- [elpa] master 5f99723 019/184: counsel.el (counsel--async-last-command): Add for ease of debugging, Oleh Krehel, 2019/10/16
- [elpa] master fb486d8 024/184: ivy.el (ivy-immediate-done): Add copy-sequence to fix read-directory-name, Oleh Krehel, 2019/10/16