mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 13:33:03 +00:00
avy.el (avy--line-cands): Split away from avy--line
* avy.el (avy--line): Update.
This commit is contained in:
parent
4dcf0a9a9a
commit
430d75085f
15
avy.el
15
avy.el
@ -1137,10 +1137,7 @@ Which one depends on variable `subword-mode'."
|
|||||||
|
|
||||||
(defvar visual-line-mode)
|
(defvar visual-line-mode)
|
||||||
|
|
||||||
(defun avy--line (&optional arg beg end)
|
(defun avy--line-cands (&optional arg beg end)
|
||||||
"Select a line.
|
|
||||||
The window scope is determined by `avy-all-windows' (ARG negates it).
|
|
||||||
Narrow the scope to BEG END."
|
|
||||||
(let (candidates)
|
(let (candidates)
|
||||||
(avy-dowindows arg
|
(avy-dowindows arg
|
||||||
(let ((ws (or beg (window-start))))
|
(let ((ws (or beg (window-start))))
|
||||||
@ -1161,8 +1158,16 @@ Narrow the scope to BEG END."
|
|||||||
(setq temporary-goal-column 0)
|
(setq temporary-goal-column 0)
|
||||||
(line-move-visual 1 t))
|
(line-move-visual 1 t))
|
||||||
(forward-line 1)))))))
|
(forward-line 1)))))))
|
||||||
|
(nreverse candidates)))
|
||||||
|
|
||||||
|
(defun avy--line (&optional arg beg end)
|
||||||
|
"Select a line.
|
||||||
|
The window scope is determined by `avy-all-windows' (ARG negates it).
|
||||||
|
Narrow the scope to BEG END."
|
||||||
(let ((avy-action #'identity))
|
(let ((avy-action #'identity))
|
||||||
(avy--process (nreverse candidates) (avy--style-fn avy-style)))))
|
(avy--process
|
||||||
|
(avy--line-cands arg beg end)
|
||||||
|
(avy--style-fn avy-style))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun avy-goto-line (&optional arg)
|
(defun avy-goto-line (&optional arg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user