Avoid image-mode and doc-view-mode

* avy-jump.el (avy--regex-candidates): Update.

Re #1
This commit is contained in:
Oleh Krehel 2015-05-05 17:39:41 +02:00
parent 6c1f2f6423
commit 1684e6af02

View File

@ -129,6 +129,7 @@ When PRED is non-nil, it's a filter for matching point positions."
(window-list)
(list (selected-window))))
(with-selected-window wnd
(unless (memq major-mode '(image-mode doc-view-mode))
(let ((we (or end (window-end (selected-window) t))))
(save-excursion
(goto-char (or beg (window-start)))
@ -138,7 +139,7 @@ When PRED is non-nil, it's a filter for matching point positions."
(funcall pred))
(push (cons (cons (match-beginning 0)
(match-end 0))
wnd) candidates))))))))
wnd) candidates)))))))))
(nreverse candidates)))
(defvar avy--overlay-offset 0