branch: elpa/anzu
commit 9d334a4e37ea908b2847bb9d74a593d5a419fd45
Author: Shohei YOSHIDA <[email protected]>
Commit: Neil Okamoto <[email protected]>

    replaced string should be compiled at regexp replace
---
 anzu.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/anzu.el b/anzu.el
index 139e51340e..d9dfb24233 100644
--- a/anzu.el
+++ b/anzu.el
@@ -774,8 +774,11 @@
                             (setq from (car from)
                                   anzu--total-matched 
anzu--last-replaced-count)))
                          ((string-match "\0" from)
-                          (prog1 (substring-no-properties from (match-end 0))
-                            (setq from (substring-no-properties from 0 
(match-beginning 0)))))
+                          (let ((replaced (substring-no-properties from 
(match-end 0))))
+                            (setq from (substring-no-properties from 0 
(match-beginning 0)))
+                            (if use-regexp
+                                (anzu--compile-replace-text replaced)
+                              replaced)))
                          (t
                           (anzu--query-replace-read-to
                            from prompt beg end use-regexp overlay-limit)))))

Reply via email to