[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master e04b10c 248/399: swiper.el (swiper-isearch-function): Refa
From: |
Oleh Krehel |
Subject: |
[elpa] master e04b10c 248/399: swiper.el (swiper-isearch-function): Refactor |
Date: |
Sat, 20 Jul 2019 14:57:33 -0400 (EDT) |
branch: master
commit e04b10cf37bf1a31a8c2e5fca1da1d59b5a780f0
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
swiper.el (swiper-isearch-function): Refactor
---
swiper.el | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/swiper.el b/swiper.el
index 106723a..4cc9bc3 100644
--- a/swiper.el
+++ b/swiper.el
@@ -1234,18 +1234,18 @@ come back to the same place as when \"a\" was initially
entered.")
(defun swiper-isearch-function (str)
"Collect STR matches in the current buffer for `swiper-isearch'."
- (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)
- (match-string 1 re)
- re))
- (pt-hist (cdr (assoc str swiper--isearch-point-history)))
- cands
- idx-found
- (idx 0))
- (with-ivy-window
+ (with-ivy-window
+ (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)
+ (match-string 1 re)
+ re))
+ (pt-hist (cdr (assoc str swiper--isearch-point-history)))
+ cands
+ idx-found
+ (idx 0))
(save-excursion
(goto-char (point-min))
(while (re-search-forward re nil t)
@@ -1263,11 +1263,11 @@ come back to the same place as when \"a\" was initially
entered.")
(match-beginning 0)
(point))))
(put-text-property 0 1 'point pos line)
- (push line cands)))))
- (setq ivy--old-re re)
- (when idx-found
- (ivy-set-index idx-found))
- (setq ivy--old-cands (nreverse cands))))))
+ (push line cands))))
+ (setq ivy--old-re re)
+ (when idx-found
+ (ivy-set-index idx-found))
+ (setq ivy--old-cands (nreverse cands)))))))
(defun swiper-isearch-action (x)
"Move to X for `swiper-isearch'."
- [elpa] master 687aae2 246/399: swiper.el (swiper-query-replace): Check for empty input, (continued)
- [elpa] master 687aae2 246/399: swiper.el (swiper-query-replace): Check for empty input, Oleh Krehel, 2019/07/20
- [elpa] master 8df253a 249/399: swiper.el (swiper--isearch-same-line-p): Add, Oleh Krehel, 2019/07/20
- [elpa] master 773ac65 245/399: swiper.el (swiper--cleanup): Re-use lazy-highlight-cleanup, Oleh Krehel, 2019/07/20
- [elpa] master 815f094 252/399: swiper.el (swiper--add-line-overlay): Extract, Oleh Krehel, 2019/07/20
- [elpa] master eb1e636 253/399: swiper.el (swiper--add-cursor-overlay): Display only in current window, Oleh Krehel, 2019/07/20
- [elpa] master 7dc1445 256/399: swiper.el (swiper-isearch): Use the same faces in the minibuffer, Oleh Krehel, 2019/07/20
- [elpa] master 4d40f88 255/399: swiper.el (swiper--isearch-function): Speedup for big files, Oleh Krehel, 2019/07/20
- [elpa] master 2ce81eb 240/399: swiper.el (swiper-isearch-toggle): Extend doc, Oleh Krehel, 2019/07/20
- [elpa] master cc92e1c 238/399: swiper.el (swiper--avy-goto): Handle quit, Oleh Krehel, 2019/07/20
- [elpa] master e6f49c2 244/399: swiper.el: Reorder by swiper--overlays, Oleh Krehel, 2019/07/20
- [elpa] master e04b10c 248/399: swiper.el (swiper-isearch-function): Refactor,
Oleh Krehel <=
- [elpa] master ee71733 247/399: ivy.el (ivy-switch-buffer-other-window): Fix ivy-use-virtual-buffers, Oleh Krehel, 2019/07/20
- [elpa] master b05ae24 254/399: swiper.el (swiper--add-properties): Extract, Oleh Krehel, 2019/07/20
- [elpa] master db3e307 250/399: swiper.el (swiper--isearch-format): Extract, Oleh Krehel, 2019/07/20
- [elpa] master 58b6f7d 257/399: swiper.el (swiper--isearch-format): Don't use blending for the current match, Oleh Krehel, 2019/07/20
- [elpa] master f628441 259/399: swiper.el (swiper-isearch): Fix "C-r", Oleh Krehel, 2019/07/20
- [elpa] master 743163c 260/399: counsel.el (counsel-minor-history): New history variable, Oleh Krehel, 2019/07/20
- [elpa] master cbb3ee1 262/399: counsel.el (counsel-company): Don't rely on company-point, Oleh Krehel, 2019/07/20
- [elpa] master 77a5ffc 261/399: counsel.el (counsel-package-history): New history variable, Oleh Krehel, 2019/07/20
- [elpa] master d5c9673 265/399: swiper.el (swiper--isearch-format): Fix permanent face modifications, Oleh Krehel, 2019/07/20
- [elpa] master 2c57036 263/399: ivy.el (ivy-call): Modify the API for ivy-action second arg, Oleh Krehel, 2019/07/20