mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 21:33:05 +00:00
Avoid image-mode and doc-view-mode
* avy-jump.el (avy--regex-candidates): Update. Re #1
This commit is contained in:
parent
6c1f2f6423
commit
1684e6af02
21
avy-jump.el
21
avy-jump.el
@ -129,16 +129,17 @@ When PRED is non-nil, it's a filter for matching point positions."
|
|||||||
(window-list)
|
(window-list)
|
||||||
(list (selected-window))))
|
(list (selected-window))))
|
||||||
(with-selected-window wnd
|
(with-selected-window wnd
|
||||||
(let ((we (or end (window-end (selected-window) t))))
|
(unless (memq major-mode '(image-mode doc-view-mode))
|
||||||
(save-excursion
|
(let ((we (or end (window-end (selected-window) t))))
|
||||||
(goto-char (or beg (window-start)))
|
(save-excursion
|
||||||
(while (re-search-forward regex we t)
|
(goto-char (or beg (window-start)))
|
||||||
(unless (get-char-property (point) 'invisible)
|
(while (re-search-forward regex we t)
|
||||||
(when (or (null pred)
|
(unless (get-char-property (point) 'invisible)
|
||||||
(funcall pred))
|
(when (or (null pred)
|
||||||
(push (cons (cons (match-beginning 0)
|
(funcall pred))
|
||||||
(match-end 0))
|
(push (cons (cons (match-beginning 0)
|
||||||
wnd) candidates))))))))
|
(match-end 0))
|
||||||
|
wnd) candidates)))))))))
|
||||||
(nreverse candidates)))
|
(nreverse candidates)))
|
||||||
|
|
||||||
(defvar avy--overlay-offset 0
|
(defvar avy--overlay-offset 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user