[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 38b5d83 015/184: swiper.el (swiper--isearch-filter-ignore-
From: |
Oleh Krehel |
Subject: |
[elpa] master 38b5d83 015/184: swiper.el (swiper--isearch-filter-ignore-order): Extract |
Date: |
Wed, 16 Oct 2019 13:14:40 -0400 (EDT) |
branch: master
commit 38b5d833fe49fdb537e21888d73833375c5a6ca5
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
swiper.el (swiper--isearch-filter-ignore-order): Extract
---
swiper.el | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/swiper.el b/swiper.el
index b437b2d..0f6aa39 100644
--- a/swiper.el
+++ b/swiper.el
@@ -1338,6 +1338,20 @@ See `ivy-format-functions-alist' for further
information."
cands)
0)))
+(defun swiper--isearch-filter-ignore-order (re-full cands)
+ (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))))
+
(defun swiper--isearch-function (str)
(let ((re-full (funcall ivy--regex-function str)))
(unless (equal re-full "")
@@ -1348,18 +1362,7 @@ See `ivy-format-functions-alist' for further
information."
(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 cands (swiper--isearch-filter-ignore-order re-full cands)))
(setq ivy--old-re re)
(ivy-set-index (swiper--isearch-next-item re cands))
(setq ivy--old-cands cands)))))
- [elpa] master 2a036b8 002/184: swiper.el (swiper--isearch-function): Change., (continued)
- [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, 2019/10/16
- [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 <=
- [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
- [elpa] master f71f89a 029/184: ivy-test.el (ivy-swiper-wgrep): Expect fail on <=24.3, Oleh Krehel, 2019/10/16
- [elpa] master 230137b 047/184: ivy.el (ivy-restrict-to-matches): Work for dynamic collection, Oleh Krehel, 2019/10/16
- [elpa] master c3bd60c 041/184: ivy.el (ivy--occur-press-update-window): Don't error if buffer was killed, Oleh Krehel, 2019/10/16
- [elpa] master 6bf2cba 053/184: ivy.el (ivy-read-action-ivy): Don't recur, Oleh Krehel, 2019/10/16
- [elpa] master 1a4ebda 048/184: Allow virtual-buffers customization, Oleh Krehel, 2019/10/16
- [elpa] master b4af1a6 040/184: swiper.el (swiper-recenter-top-bottom): Works for swiper-isearch, Oleh Krehel, 2019/10/16
- [elpa] master 327dbd6 058/184: counsel.el (counsel-rg-base-command): Don't include directory on non-Windows, Oleh Krehel, 2019/10/16
- [elpa] master 5140127 046/184: ivy.el: Run ispell-comments-and-strings, Oleh Krehel, 2019/10/16