[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/anzu 06f4cf2fe7 037/288: Introduce anzu-minimum-input-leng
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/anzu 06f4cf2fe7 037/288: Introduce anzu-minimum-input-length |
Date: |
Thu, 6 Jan 2022 03:58:37 -0500 (EST) |
branch: elpa/anzu
commit 06f4cf2fe739352975ee0a77f05ed9052de456b3
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>
Introduce anzu-minimum-input-length
---
anzu.el | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/anzu.el b/anzu.el
index 8363b0d428..b69eebc20f 100644
--- a/anzu.el
+++ b/anzu.el
@@ -53,6 +53,11 @@
:type 'boolean
:group 'anzu)
+(defcustom anzu-minimum-input-length 1
+ "Minimum input length to enable anzu"
+ :type 'integer
+ :group 'anzu)
+
(defcustom anzu-use-migemo nil
"Flag of using migemo"
:type 'boolean
@@ -121,16 +126,16 @@
finally return 0))
(defun anzu--update ()
- (unless (string= isearch-string "")
+ (when (>= (length isearch-string) anzu-minimum-input-length)
(let ((result (if (string= isearch-string anzu--last-isearch-string)
anzu--cached-positions
(anzu--search-all-position isearch-string))))
(let ((total (car result))
(positions (cdr result)))
- (setq anzu--total-matched total
- anzu--current-posion (anzu--where-is-here positions (point))
- anzu--last-isearch-string isearch-string)
- (force-mode-line-update)))))
+ (setq anzu--total-matched total
+ anzu--current-posion (anzu--where-is-here positions (point))
+ anzu--last-isearch-string isearch-string)
+ (force-mode-line-update)))))
(defsubst anzu--mode-line-not-set-p ()
(and (listp mode-line-format)
- [nongnu] elpa/anzu 1afa7d7b0f 013/288: Add flag whether anzu.el cons search info to mode-line(#4), (continued)
- [nongnu] elpa/anzu 1afa7d7b0f 013/288: Add flag whether anzu.el cons search info to mode-line(#4), ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu e9bb490b65 003/288: Update document, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 9de45b406c 004/288: add sample, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 9ab3cfa390 007/288: Merge pull request #3 from kiwanami/master, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu e39deb4aec 011/288: Add comment section, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 6fda98326a 024/288: input is regexp if isearch-regexp is non-nil, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 9ec5a834cf 025/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 8f91b00c91 028/288: Improve the documentation a bit, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu b644e9d067 034/288: Better one-line description, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 06ae1b1f7e 035/288: Merge pull request #9 from purcell/patch-1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 06f4cf2fe7 037/288: Introduce anzu-minimum-input-length,
ELPA Syncer <=
- [nongnu] elpa/anzu e82b3d4236 069/288: Use delimiter regexp at anzu-query-replace-at-cursor, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu b211f9a50f 067/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 4f024cd623 081/288: Clear last input cache after isearch command, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 3a7fcf2096 094/288: Merge pull request #14 from syohex/fix-increasing-anzuinfo-issue, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 537b8bfd36 071/288: Add autoload cookie, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 6b01763088 077/288: Improve replace regular expression, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu abd5953eac 018/288: Add Installation section, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 4cfbddbc07 020/288: Reset match count variables in isearch-mode-end-hook, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu de70e2fa4a 031/288: Enable mode unconditionally in examples, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 2b88e1fcbc 021/288: Improve for not regexp search commands, ELPA Syncer, 2022/01/06