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

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

[nongnu] elpa/anzu 264c36d135 076/288: Fix overlay is not put if match-s


From: ELPA Syncer
Subject: [nongnu] elpa/anzu 264c36d135 076/288: Fix overlay is not put if match-string is 0 length
Date: Thu, 6 Jan 2022 03:58:41 -0500 (EST)

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

    Fix overlay is not put if match-string is 0 length
    
    For example, '^' or '$'.
---
 anzu.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/anzu.el b/anzu.el
index 207f6adba8..06e9d8b585 100644
--- a/anzu.el
+++ b/anzu.el
@@ -296,12 +296,12 @@
               (incf count)
               (let ((beg (match-beginning 0))
                     (end (match-end 0)))
-                (if (= beg end)
-                    (if (eobp)
-                        (setq finish t)
-                      (forward-char 1))
-                  (when (and (>= beg overlay-beg) (<= end overlay-end))
-                    (anzu--add-overlay str beg end)))))
+                (when (and (>= beg overlay-beg) (<= end overlay-end))
+                  (anzu--add-overlay str beg end))
+                (when (= beg end)
+                  (if (eobp)
+                      (setq finish t)
+                    (forward-char 1)))))
             (setq anzu--cached-count count)))))))
 
 (defun anzu--check-minibuffer-input (buf beg end use-regexp overlay-limit)



reply via email to

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