[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 3af75cf 364/399: swiper.el (swiper--positive-regexps): Ext
From: |
Oleh Krehel |
Subject: |
[elpa] master 3af75cf 364/399: swiper.el (swiper--positive-regexps): Extract |
Date: |
Sat, 20 Jul 2019 14:58:00 -0400 (EDT) |
branch: master
commit 3af75cf1ff2a6b6110baf103f2cda8e9f44f6e1e
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
swiper.el (swiper--positive-regexps): Extract
---
swiper.el | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/swiper.el b/swiper.el
index cf4f41a..c2caeb2 100644
--- a/swiper.el
+++ b/swiper.el
@@ -852,16 +852,19 @@ the face, window and priority of the overlay."
(or (display-graphic-p)
(not recenter-redisplay)))
+(defun swiper--positive-regexps (str)
+ (let ((regexp-or-regexps
+ (funcall ivy--regex-function str)))
+ (if (listp regexp-or-regexps)
+ (mapcar #'car (cl-remove-if-not #'cdr regexp-or-regexps))
+ (list regexp-or-regexps))))
+
(defun swiper--update-input-ivy ()
"Called when `ivy' input is updated."
(with-ivy-window
(swiper--cleanup)
(when (> (length (ivy-state-current ivy-last)) 0)
- (let* ((regexp-or-regexps (funcall ivy--regex-function ivy-text))
- (regexps
- (if (listp regexp-or-regexps)
- (mapcar #'car (cl-remove-if-not #'cdr regexp-or-regexps))
- (list regexp-or-regexps))))
+ (let ((regexps (swiper--positive-regexps ivy-text)))
(dolist (re regexps)
(let* ((re (replace-regexp-in-string
" " "\t"
- [elpa] master 460d6e3 355/399: ivy.el (ivy-read): Refactor, (continued)
- [elpa] master 460d6e3 355/399: ivy.el (ivy-read): Refactor, Oleh Krehel, 2019/07/20
- [elpa] master ebac0e9 352/399: ivy.el (ivy--compute-extra-actions): Extract, Oleh Krehel, 2019/07/20
- [elpa] master bae8e46 361/399: ivy.el (ivy--magic-file-doubleslash-directory): Cd remote "/" on "//", Oleh Krehel, 2019/07/20
- [elpa] master a87bdd2 358/399: ivy.el (ivy-read): Refactor, Oleh Krehel, 2019/07/20
- [elpa] master 5e1c468 357/399: ivy.el (ivy--cleanup): Extract, Oleh Krehel, 2019/07/20
- [elpa] master 520fd83 360/399: ivy.el (ivy-read): Simplify, Oleh Krehel, 2019/07/20
- [elpa] master 2d22e05 363/399: doc/ivy.org: Add more info on TRAMP, Oleh Krehel, 2019/07/20
- [elpa] master 180d329 365/399: swiper.el (swiper--re-builder): Improve for char-fold-to-regexp, Oleh Krehel, 2019/07/20
- [elpa] master 4e9e310 368/399: ivy.el (ivy-read): Fix swiper-query-replace not working, Oleh Krehel, 2019/07/20
- [elpa] master a0b71a1 362/399: ivy.el (ivy--magic-tilde-directory): Cd remote "~" on "~", Oleh Krehel, 2019/07/20
- [elpa] master 3af75cf 364/399: swiper.el (swiper--positive-regexps): Extract,
Oleh Krehel <=
- [elpa] master 916e281 367/399: ivy.el (ivy-read): Fix bad refactor, Oleh Krehel, 2019/07/20
- [elpa] master 1ea4ebb 370/399: Fix minor typo, Oleh Krehel, 2019/07/20
- [elpa] master 2fa7cec 366/399: ivy-test.el (swiper--re-builder): Add test, Oleh Krehel, 2019/07/20
- [elpa] master 57e77a5 372/399: counsel.el (counsel-git-log-split-string-re): Change., Oleh Krehel, 2019/07/20
- [elpa] master 72a827a 373/399: counsel.el (counsel-git-log): Add additional action., Oleh Krehel, 2019/07/20
- [elpa] master 259cf07 374/399: Fix ivy-previous-line-or-history, Oleh Krehel, 2019/07/20
- [elpa] master d91f61d 378/399: counsel.el (counsel--split-string): Extract, Oleh Krehel, 2019/07/20
- [elpa] master e858b10 371/399: Add autoload for various commands, Oleh Krehel, 2019/07/20
- [elpa] master 75f4146 377/399: ivy.el (ivy-occur-revert-buffer): Stay on the same line, Oleh Krehel, 2019/07/20
- [elpa] master 3ec81dc 369/399: ivy-test.el (swiper--re-builder-char-fold): Split away, Oleh Krehel, 2019/07/20