avy.el (avy-goto-line-above): Work in a single window

* avy.el (avy-goto-line-above):
(avy-goto-line-below): Bind `avy-all-windows' to nil.

Re #106
This commit is contained in:
Oleh Krehel 2015-12-03 10:20:23 +01:00
parent a0414291f1
commit 4132dd647e

10
avy.el
View File

@ -1066,7 +1066,8 @@ Otherwise, forward to `goto-line' with ARG."
(defun avy-goto-line-above () (defun avy-goto-line-above ()
"Goto visible line above the cursor." "Goto visible line above the cursor."
(interactive) (interactive)
(let ((r (avy--line nil (window-start) (point)))) (let* ((avy-all-windows nil)
(r (avy--line nil (window-start) (point))))
(unless (eq r t) (unless (eq r t)
(avy-action-goto r)))) (avy-action-goto r))))
@ -1074,9 +1075,10 @@ Otherwise, forward to `goto-line' with ARG."
(defun avy-goto-line-below () (defun avy-goto-line-below ()
"Goto visible line below the cursor." "Goto visible line below the cursor."
(interactive) (interactive)
(let ((r (avy--line (let* ((avy-all-windows nil)
nil (point) (r (avy--line
(window-end (selected-window) t)))) nil (point)
(window-end (selected-window) t))))
(unless (eq r t) (unless (eq r t)
(avy-action-goto r)))) (avy-action-goto r))))