diff --git a/avy.el b/avy.el index ce48da5..402f7ea 100644 --- a/avy.el +++ b/avy.el @@ -567,6 +567,25 @@ The window scope is determined by `avy-all-windows' (ARG negates it)." arg avy-style))) +;;;###autoload +(defun avy-goto-char-in-line (char &optional arg) + "Jump to the currently visible CHAR in the current line. +The window scope is determined by `avy-all-windows' (ARG negates it)." + (interactive (list (read-char "char: ") + current-prefix-arg)) + (let ((avy-all-windows + (if arg + (not avy-all-windows) + avy-all-windows))) + (avy--with-avy-keys avy-goto-char + (avy--goto + (avy--process + (save-restriction + (narrow-to-region (line-beginning-position) + (line-end-position)) + (avy--regex-candidates (string char))) + (avy--style-fn avy-style)))))) + ;;;###autoload (defun avy-goto-char-2 (char1 char2 &optional arg) "Jump to the currently visible CHAR1 followed by CHAR2.