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

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

[elpa] master dd2d495 312/399: swiper.el (swiper-all-thing-at-point): Ad


From: Oleh Krehel
Subject: [elpa] master dd2d495 312/399: swiper.el (swiper-all-thing-at-point): Add
Date: Sat, 20 Jul 2019 14:57:47 -0400 (EDT)

branch: master
commit dd2d49511cf7bf540a0c707c78cda26b6f377925
Author: adrianstaniec <address@hidden>
Commit: Oleh Krehel <address@hidden>

    swiper.el (swiper-all-thing-at-point): Add
    
    Fixes #2106
---
 swiper.el | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/swiper.el b/swiper.el
index 2dd1a1c..9990664 100644
--- a/swiper.el
+++ b/swiper.el
@@ -516,6 +516,15 @@ When non-nil, INITIAL-INPUT is the initial search pattern."
       (deactivate-mark))
     (swiper thing)))
 
+;;;###autoload
+(defun swiper-all-thing-at-point ()
+  "`swiper-all' with `ivy-thing-at-point'."
+  (interactive)
+  (let ((thing (ivy-thing-at-point)))
+    (when (use-region-p)
+      (deactivate-mark))
+    (swiper-all thing)))
+
 (defvar swiper--current-window-start nil
   "Store `window-start' to restore it later.
 This prevents a \"jumping\" behavior which occurs when variables



reply via email to

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