mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-15 06:03:04 +00:00
Introduce single candidate jump customization
This commit is contained in:
parent
cd8fb10759
commit
abe150c7bd
6
avy.el
6
avy.el
@ -244,6 +244,10 @@ When nil, punctuation chars will not be matched.
|
|||||||
Typically, these modes don't use the text representation."
|
Typically, these modes don't use the text representation."
|
||||||
:type 'list)
|
:type 'list)
|
||||||
|
|
||||||
|
(defcustom avy-single-candidate-jump t
|
||||||
|
"In case there is only one candidate jumps directly to it."
|
||||||
|
:type 'boolean)
|
||||||
|
|
||||||
(defvar avy-ring (make-ring 20)
|
(defvar avy-ring (make-ring 20)
|
||||||
"Hold the window and point history.")
|
"Hold the window and point history.")
|
||||||
|
|
||||||
@ -746,7 +750,7 @@ Set `avy-style' according to COMMMAND as well."
|
|||||||
(let ((len (length candidates)))
|
(let ((len (length candidates)))
|
||||||
(cond ((= len 0)
|
(cond ((= len 0)
|
||||||
nil)
|
nil)
|
||||||
((= len 1)
|
((and (= len 1) avy-single-candidate-jump)
|
||||||
(car candidates))
|
(car candidates))
|
||||||
(t
|
(t
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
|
Loading…
x
Reference in New Issue
Block a user