[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/anzu 5718f08dc6 066/288: Fix case fold issue
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/anzu 5718f08dc6 066/288: Fix case fold issue |
Date: |
Thu, 6 Jan 2022 03:58:40 -0500 (EST) |
branch: elpa/anzu
commit 5718f08dc65fe43783ac5042b7466ea5cfabad13
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>
Fix case fold issue
Match count is invalid if user input has UPPER character
---
anzu.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/anzu.el b/anzu.el
index 642d0fd53d..c0ad3a3e0a 100644
--- a/anzu.el
+++ b/anzu.el
@@ -125,6 +125,10 @@
(defsubst anzu--construct-position-info (count overflow positions)
(list :count count :overflow overflow :positions positions))
+(defsubst anzu--case-fold-search (input)
+ (let ((case-fold-search nil))
+ (not (string-match-p "[A-Z]" input))))
+
(defun anzu--search-all-position (str)
(unless anzu--last-command
(setq anzu--last-command last-command))
@@ -141,7 +145,8 @@
(finish nil)
(search-func (if (and anzu-use-migemo migemo-isearch-enable-p)
'migemo-forward
- 're-search-forward)))
+ 're-search-forward))
+ (case-fold-search (anzu--case-fold-search str)))
(while (and (not finish) (funcall search-func str nil t))
(push (cons (match-beginning 0) (match-end 0)) positions)
(incf count)
@@ -264,10 +269,6 @@
(overlay-put ov 'face 'anzu-replace-highlight)
(overlay-put ov 'anzu-replace t)))
-(defsubst anzu--case-fold-search (input)
- (let ((case-fold-search nil))
- (not (string-match-p "[A-Z]" input))))
-
(defun anzu--count-matched (buf str replace-beg replace-end use-regexp
overlay-limit)
(when (not use-regexp)
(setq str (regexp-quote str)))
- [nongnu] elpa/anzu 591b27621c 047/288: Merge pull request #11 from syohex/support-query-replace, (continued)
- [nongnu] elpa/anzu 591b27621c 047/288: Merge pull request #11 from syohex/support-query-replace, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 1fc36f460c 046/288: Implement anzu-query-regexp and anzu-query-regexp, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu cdee5811bb 048/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 28953f86f9 051/288: bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 2bcd549c5a 054/288: Re-factoring: reduce global variables, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 9a055d9b0b 056/288: Add replacement feature like evil replace, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu ce021b7234 057/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 602aa46fe7 070/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 4d50eb8274 072/288: Implement anzu-query-replace-at-cursor-thing, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu ad0d7bce91 073/288: Update document, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 5718f08dc6 066/288: Fix case fold issue,
ELPA Syncer <=
- [nongnu] elpa/anzu 17b3ab244b 074/288: Fix case, no symbol at cursor, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu c324833756 080/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu f50be69c0f 082/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu eb2b4ec103 084/288: fix link, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 156980dc69 092/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu c7ecd57c24 095/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 91f3478003 097/288: Merge pull request #15 from syohex/fix-nonprefix-case, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 189c0eaf9f 101/288: Bump up version and update Changes, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 0b3cf4b0a6 103/288: Merge pull request #17 from syohex/add-nonquery-replace-command, ELPA Syncer, 2022/01/06
- [nongnu] elpa/anzu 2a9785459b 111/288: Merge pull request #20 from syohex/enable-lexical-binding, ELPA Syncer, 2022/01/06