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

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

[elpa] master 680f6e2 44/54: swiper.el (swiper--ivy): Use minibuffer-all


From: Oleh Krehel
Subject: [elpa] master 680f6e2 44/54: swiper.el (swiper--ivy): Use minibuffer-allow-text-properties
Date: Tue, 29 Sep 2015 14:10:07 +0000

branch: master
commit 680f6e2255d3ad04035c842d0ad8c38c019e3fbc
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    swiper.el (swiper--ivy): Use minibuffer-allow-text-properties
    
    Using `minibuffer-allow-text-properties' makes Emacs not strip the text
    properties from the result of `read-from-minibuffer'. This is better
    because a function call result is used instead of a global var to pass
    this info.
---
 swiper.el |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/swiper.el b/swiper.el
index 3f800f8..cd13b8c 100644
--- a/swiper.el
+++ b/swiper.el
@@ -266,22 +266,24 @@ Please remove it and update the \"swiper\" package."))
   (let ((candidates (swiper--candidates))
         (preselect (buffer-substring-no-properties
                     (line-beginning-position)
-                    (line-end-position))))
+                    (line-end-position)))
+        (minibuffer-allow-text-properties t)
+        res)
     (unwind-protect
-         (ivy-read
-          "Swiper: "
-          candidates
-          :initial-input initial-input
-          :keymap swiper-map
-          :preselect preselect
-          :require-match t
-          :update-fn #'swiper--update-input-ivy
-          :unwind #'swiper--cleanup
-          :re-builder #'swiper--re-builder
-          :history 'swiper-history)
+         (setq res (ivy-read
+                    "Swiper: "
+                    candidates
+                    :initial-input initial-input
+                    :keymap swiper-map
+                    :preselect preselect
+                    :require-match t
+                    :update-fn #'swiper--update-input-ivy
+                    :unwind #'swiper--cleanup
+                    :re-builder #'swiper--re-builder
+                    :history 'swiper-history))
       (if (null ivy-exit)
           (goto-char swiper--opoint)
-        (swiper--action ivy--current ivy-text)))))
+        (swiper--action res ivy-text)))))
 
 (defun swiper--ensure-visible ()
   "Remove overlays hiding point."



reply via email to

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