[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 8dc7a05 008/395: swiper.el (swiper--remember-
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 8dc7a05 008/395: swiper.el (swiper--remember-search-history): Extract |
Date: |
Thu, 25 Feb 2021 08:31:19 -0500 (EST) |
branch: externals/ivy-hydra
commit 8dc7a05493d938fa97fd2483b66216c4bce7c3a9
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
swiper.el (swiper--remember-search-history): Extract
---
swiper.el | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/swiper.el b/swiper.el
index f2305ec..3e3e2b0 100644
--- a/swiper.el
+++ b/swiper.el
@@ -1097,20 +1097,23 @@ WND, when specified is the window."
(when (eq ivy-exit 'done)
(push-mark swiper--opoint t)
(message "Mark saved where search started"))))
- (add-to-history
- 'regexp-search-ring
- re
- regexp-search-ring-max)
- ;; integration with evil-mode's search
- (when (bound-and-true-p evil-mode)
- (when (eq evil-search-module 'isearch)
- (setq isearch-string ivy-text))
- (when (eq evil-search-module 'evil-search)
- (add-to-history 'evil-ex-search-history re)
- (setq evil-ex-search-pattern (list re t t))
- (setq evil-ex-search-direction 'forward)
- (when evil-ex-search-persistent-highlight
- (evil-ex-search-activate-highlight evil-ex-search-pattern))))))))
+ (swiper--remember-search-history re)))))
+
+(defun swiper--remember-search-history (re)
+ (add-to-history
+ 'regexp-search-ring
+ re
+ regexp-search-ring-max)
+ ;; integration with evil-mode's search
+ (when (bound-and-true-p evil-mode)
+ (when (eq evil-search-module 'isearch)
+ (setq isearch-string ivy-text))
+ (when (eq evil-search-module 'evil-search)
+ (add-to-history 'evil-ex-search-history re)
+ (setq evil-ex-search-pattern (list re t t))
+ (setq evil-ex-search-direction 'forward)
+ (when evil-ex-search-persistent-highlight
+ (evil-ex-search-activate-highlight evil-ex-search-pattern)))))
(defun swiper-from-isearch ()
"Invoke `swiper' from isearch."
- [elpa] branch externals/ivy-hydra created (now 65f5783), Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 8dc7a05 008/395: swiper.el (swiper--remember-search-history): Extract,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra d4e17ee 009/395: Also remember search history when using swiper-isearch, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c5e162a 013/395: swiper.el (swiper-thing-at-point): Use regexp-quote, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra be231a5 001/395: counsel.el (counsel-kmacro): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1ad457d 007/395: ivy.el (ivy-read-action-function): Fix type, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f6b3b29 011/395: counsel.el (counsel-compile-forget-command): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 7b1af79 012/395: counsel.el (counsel--projectile-root): Add, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 32c097a 004/395: counsel.el (counsel-search): Rename from counsel-google and add DDG, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 884dd9e 025/395: counsel.el (counsel--git-grep-occur-cmd): Handle case folding, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 9666820 037/395: swiper.el (swiper--add-overlays): Don't miss highlights when at eol, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ad00c47 039/395: swiper.el (swiper--re-builder): Treat "\n" in input as a newline, Basil L. Contovounesios, 2021/02/25