emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-hydra d4e17ee 009/395: Also remember search history


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra d4e17ee 009/395: Also remember search history when using swiper-isearch
Date: Thu, 25 Feb 2021 08:31:19 -0500 (EST)

branch: externals/ivy-hydra
commit d4e17ee10aeba5dc3a02c9d2233b066cabd9d986
Author: wouter bolsterlee <wouter@bolsterl.ee>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    Also remember search history when using swiper-isearch
    
    Fixes #2293
    Fixes #2294
---
 swiper.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/swiper.el b/swiper.el
index 3e3e2b0..d8c6f54 100644
--- a/swiper.el
+++ b/swiper.el
@@ -1100,6 +1100,7 @@ WND, when specified is the window."
         (swiper--remember-search-history re)))))
 
 (defun swiper--remember-search-history (re)
+  "Add the search pattern RE to the search history ring."
   (add-to-history
    'regexp-search-ring
    re
@@ -1460,7 +1461,8 @@ that we search only for one character."
           (goto-char (match-beginning 0)))
         (isearch-range-invisible (point) (1+ (point)))
         (swiper--maybe-recenter)
-        (unless (eq ivy-exit 'done)
+        (if (eq ivy-exit 'done)
+            (swiper--remember-search-history (ivy--regex ivy-text))
           (swiper--cleanup)
           (swiper--delayed-add-overlays)
           (swiper--add-cursor-overlay



reply via email to

[Prev in Thread] Current Thread [Next in Thread]