branch: master
commit 0a9fb0c735f9e55879eb9ef317ab382f7a3b0326
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
swiper.el (swiper--isearch-function): Refactor
---
swiper.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/swiper.el b/swiper.el
index 8820949..9b57894 100644
--- a/swiper.el
+++ b/swiper.el
@@ -1336,11 +1336,11 @@ See `ivy-format-functions-alist' for further
information."
(nreverse cands)))))
(defun swiper--isearch-function (str)
- (let* ((case-fold-search (ivy--case-fold-p str))
- (re-full (funcall ivy--regex-function str))
- (re (ivy-re-to-str re-full)))
- (unless (string= re "")
- (let* ((re (if (string-match "\\`\\(.*\\)[\\]|\\'" re)
+ (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))
+ (re (if (string-match "\\`\\(.*\\)[\\]|\\'" re)
(match-string 1 re)
re))
(res (swiper--isearch-function-1 re swiper--isearch-backward))