branch: elpa/anzu
commit 264c36d13509c6b5bf5f732df2b16d3243ad5054
Author: Syohei YOSHIDA <[email protected]>
Commit: Syohei YOSHIDA <[email protected]>
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)