mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 13:33:03 +00:00
Regexp-quote strings of avy-goto-char* functions.
Before this commit, avy-goto-char with char ^ would inf-loop because the resulting string "^" is treated as a regular expressions. However, with the avy-goto-char* function, the char should be treated literally. For example, in Clojure ^:foo is treated as metadata annotation and thus ^ is a likely jump target.
This commit is contained in:
parent
567727096a
commit
1d184b0e2a
@ -236,7 +236,7 @@ The window scope is determined by `avy-all-windows'.
|
||||
When ARG is non-nil, flip the window scope."
|
||||
(interactive "P")
|
||||
(avy--generic-jump
|
||||
(string (read-char "char: ")) arg))
|
||||
(regexp-quote (string (read-char "char: "))) arg))
|
||||
|
||||
;;;###autoload
|
||||
(defun avy-goto-char-2 (&optional arg)
|
||||
@ -244,9 +244,9 @@ When ARG is non-nil, flip the window scope."
|
||||
When ARG is non-nil, flip the window scope."
|
||||
(interactive "P")
|
||||
(avy--generic-jump
|
||||
(string
|
||||
(regexp-quote (string
|
||||
(read-char "char 1: ")
|
||||
(read-char "char 2: "))
|
||||
(read-char "char 2: ")))
|
||||
arg))
|
||||
|
||||
;;;###autoload
|
||||
|
Loading…
x
Reference in New Issue
Block a user