[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-anzu 6cac9c1fef 16/27: Make anzu work with the 'evil-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-anzu 6cac9c1fef 16/27: Make anzu work with the 'evil-search search module |
Date: |
Thu, 6 Jan 2022 03:59:31 -0500 (EST) |
branch: elpa/evil-anzu
commit 6cac9c1fef336ad0f35ffea9223fc3a6c25f9d62
Author: Gordon Gustafson <gordon3.14@gmail.com>
Commit: Gordon Gustafson <gordon3.14@gmail.com>
Make anzu work with the 'evil-search search module
To test, run "make emacs" from evil's directory and switch to the
'evil-search search module:
(evil-select-search-module 'evil-search-module 'evil-search)
---
evil-anzu.el | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/evil-anzu.el b/evil-anzu.el
index 0978f62e3d..c9e0fa20e3 100644
--- a/evil-anzu.el
+++ b/evil-anzu.el
@@ -33,11 +33,25 @@
(let ((isearch-regexp regexp-p))
(anzu--update string)))
+(defadvice evil-ex-find-next (after evil-anzu-compat (&optional pattern
direction nowrap) activate)
+ "Make anzu work with the 'evil-search search module.
+If PATTERN is not specified the current global pattern
`evil-ex-search-pattern' is used."
+ (anzu--cons-mode-line-search)
+ (let* ((isearch-regexp t) ; all evil-ex searches are regexp searches
+ (current-pattern (or pattern evil-ex-search-pattern))
+ (regexp (evil-ex-pattern-regex current-pattern)))
+ (save-match-data ; don't let anzu's searching mess up evil
+ (anzu--update regexp))))
+
(defadvice evil-flash-hook (after evil-anzu-compat activate)
;; Prevent flickering, only run if timer is not active
(unless (memq evil-flash-timer timer-list)
(anzu--reset-mode-line)))
+(defadvice evil-ex-delete-hl (after evil-anzu-compat (name) activate)
+ (when (eq name 'evil-ex-search)
+ (anzu--reset-mode-line)))
+
(provide 'evil-anzu)
;;; evil-anzu.el ends here
- [nongnu] branch elpa/evil-anzu created (now d3f6ed4773), ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-anzu 911c43022e 01/27: init repos, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-anzu c2318e6aad 04/27: Merge pull request #1 from syohex/disable-highlight-when-flash, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-anzu 374bea49a3 14/27: Add configuration example, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-anzu 6cac9c1fef 16/27: Make anzu work with the 'evil-search search module,
ELPA Syncer <=
- [nongnu] elpa/evil-anzu 995141132b 17/27: Merge pull request #6 from GordonGustafson/master, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-anzu fbf975f676 26/27: Merge pull request #10 from CeleritasCelery/master, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-anzu 012bbb192f 25/27: add unload feature function, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-anzu c5f8dd4aa0 05/27: add evil dependency, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-anzu 47624e12ca 11/27: Update readme, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-anzu a041db15bd 20/27: Fix melpa stable link, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-anzu 183e42a7e4 21/27: Update README, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-anzu 58d9f8f099 02/27: Add sample configuration, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-anzu cb42ec7d77 03/27: remove anzu status when evil-flash-hook is called, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-anzu d08a2e92f9 06/27: add screencasts, ELPA Syncer, 2022/01/06