mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 21:33:05 +00:00
Allow all kinds of styles for `avy-goto-line'
* avy.el (avy--line): Use the custom style. Use line end postion for 'post style. Fixes abo-abo/ace-link#17 Any of the following do something different now: (setq avy-styles-alist '((avy-goto-line . post))) (setq avy-styles-alist '((avy-goto-line . at))) (setq avy-styles-alist '((avy-goto-line . at-full))) (setq avy-styles-alist '((avy-goto-line . pre)))
This commit is contained in:
parent
b0512fc8f7
commit
a39f689908
8
avy.el
8
avy.el
@ -640,9 +640,13 @@ The window scope is determined by `avy-all-windows' (ARG negates it)."
|
|||||||
(while (< (point) (point-max))
|
(while (< (point) (point-max))
|
||||||
(unless (get-char-property
|
(unless (get-char-property
|
||||||
(max (1- (point)) ws) 'invisible)
|
(max (1- (point)) ws) 'invisible)
|
||||||
(push (cons (point) (selected-window)) candidates))
|
(push (cons
|
||||||
|
(if (eq avy-style 'post)
|
||||||
|
(line-end-position)
|
||||||
|
(line-beginning-position))
|
||||||
|
(selected-window)) candidates))
|
||||||
(forward-line 1))))))
|
(forward-line 1))))))
|
||||||
(avy--process (nreverse candidates) #'avy--overlay-pre)))
|
(avy--process (nreverse candidates) (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