mirror of
https://github.com/abo-abo/avy.git
synced 2026-02-04 06:42:26 +00:00
Add option to match newline in avy-goto-char-timer
Fixes #220 Fixes #225
This commit is contained in:
committed by
Oleh Krehel
parent
9103291214
commit
c08fc7c1c6
8
avy.el
8
avy.el
@@ -1768,6 +1768,10 @@ newline."
|
|||||||
|
|
||||||
(defcustom avy-timeout-seconds 0.5
|
(defcustom avy-timeout-seconds 0.5
|
||||||
"How many seconds to wait for the second char."
|
"How many seconds to wait for the second char."
|
||||||
|
:type 'float)
|
||||||
|
|
||||||
|
(defcustom avy-enter-times-out t
|
||||||
|
"Whether enter exits avy-goto-char-timer early. If nil it matches newline"
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
(defun avy--read-candidates (&optional re-builder)
|
(defun avy--read-candidates (&optional re-builder)
|
||||||
@@ -1802,7 +1806,9 @@ Otherwise, the whole regex is highlighted."
|
|||||||
(delete-overlay ov))
|
(delete-overlay ov))
|
||||||
(setq overlays nil)
|
(setq overlays nil)
|
||||||
(cond
|
(cond
|
||||||
;; Handle RET
|
;; Handle RET
|
||||||
|
((= char 13)
|
||||||
|
(if avy-enter-times-out
|
||||||
(setq break t)
|
(setq break t)
|
||||||
(setq str (concat str (list ?\n)))))
|
(setq str (concat str (list ?\n)))))
|
||||||
;; Handle C-h, DEL
|
;; Handle C-h, DEL
|
||||||
|
|||||||
Reference in New Issue
Block a user