mirror of
https://github.com/abo-abo/avy.git
synced 2026-02-04 14:52:25 +00:00
Escape regex metacharacters for standard isearch
Doing an isearch for '[' and then invoking avy-isearch would trigger an
error like:
Invalid regexp: "Unmatched [ or [^"
If we are not doing a regex-based search, escape the search string to
avoid these kind of issues.
This commit is contained in:
4
avy.el
4
avy.el
@@ -982,7 +982,9 @@ The window scope is determined by `avy-all-windows' (ARG negates it)."
|
|||||||
(avy-with avy-isearch
|
(avy-with avy-isearch
|
||||||
(let ((avy-background nil))
|
(let ((avy-background nil))
|
||||||
(avy--process
|
(avy--process
|
||||||
(avy--regex-candidates isearch-string)
|
(avy--regex-candidates (if isearch-regexp
|
||||||
|
isearch-string
|
||||||
|
(regexp-quote isearch-string)))
|
||||||
(avy--style-fn avy-style))
|
(avy--style-fn avy-style))
|
||||||
(isearch-done))))
|
(isearch-done))))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user