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

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

[nongnu] elpa/anzu 13401ab3c6 249/288: Don't search over bound


From: ELPA Syncer
Subject: [nongnu] elpa/anzu 13401ab3c6 249/288: Don't search over bound
Date: Thu, 6 Jan 2022 03:58:57 -0500 (EST)

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

    Don't search over bound
---
 anzu.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/anzu.el b/anzu.el
index 6e1eb8785b..577474eb27 100644
--- a/anzu.el
+++ b/anzu.el
@@ -388,6 +388,8 @@
                   (if (eobp)
                       (setq finish t)
                     (forward-char 1)))
+                (when (and replace-end (> (point) replace-end))
+                  (setq finish t))
                 (when (and (>= beg overlay-beg) (<= end overlay-end) (not 
finish))
                   (cl-incf overlayed)
                   (anzu--add-overlay beg end))))
@@ -723,7 +725,9 @@
                (when (= (match-beginning 0) (match-end 0))
                  (if (eobp)
                      (cl-return nil)
-                   (forward-char 1)))))))
+                   (forward-char 1)))
+               (when (and end (> (point) end))
+                 (cl-return nil))))))
 
 (cl-defun anzu--query-replace-common (use-regexp
                                       &key at-cursor thing prefix-arg (query 
t) isearch-p)



reply via email to

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