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

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

[nongnu] elpa/anzu 7fb133e847 180/288: Fix zero width replacement such a


From: ELPA Syncer
Subject: [nongnu] elpa/anzu 7fb133e847 180/288: Fix zero width replacement such as '^'(#44)
Date: Thu, 6 Jan 2022 03:58:50 -0500 (EST)

branch: elpa/anzu
commit 7fb133e847f313075e15df823a30f951af97b777
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>

    Fix zero width replacement such as '^'(#44)
---
 anzu.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/anzu.el b/anzu.el
index fb585b171b..e0f2ba0fd6 100644
--- a/anzu.el
+++ b/anzu.el
@@ -636,7 +636,13 @@
     (cl-loop with curbuf = (current-buffer)
              with search-func = (if use-regexp 're-search-forward 
'search-forward)
              while (funcall search-func from end t)
-             do (anzu--set-marker (match-beginning 0) curbuf))))
+             do
+             (progn
+               (anzu--set-marker (match-beginning 0) curbuf)
+               (when (= (match-beginning 0) (match-end 0))
+                 (if (eobp)
+                     (cl-return nil)
+                   (forward-char 1)))))))
 
 (cl-defun anzu--query-replace-common (use-regexp &key at-cursor thing 
prefix-arg (query t))
   (anzu--cons-mode-line 'replace-query)



reply via email to

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