mirror of
https://github.com/abo-abo/avy.git
synced 2025-10-13 21:33:05 +00:00
Modify avy--read-string-timer
This commit is contained in:
parent
22b4ff0658
commit
acdd9e8b3d
8
avy.el
8
avy.el
@ -1047,7 +1047,7 @@ may be read if it is entered before `avy-timeout-seconds'. `DEL'
|
|||||||
deletes the last char entered, and `RET' exits with the currently
|
deletes the last char entered, and `RET' exits with the currently
|
||||||
read string immediately instead of waiting for another char for
|
read string immediately instead of waiting for another char for
|
||||||
`avy-timeout-seconds'."
|
`avy-timeout-seconds'."
|
||||||
(let ((str "") char break overlays)
|
(let ((str "") char break overlays regex)
|
||||||
(unwind-protect
|
(unwind-protect
|
||||||
(progn
|
(progn
|
||||||
(while (and (not break)
|
(while (and (not break)
|
||||||
@ -1077,11 +1077,13 @@ read string immediately instead of waiting for another char for
|
|||||||
(when (>= (length str) 1)
|
(when (>= (length str) 1)
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (window-start))
|
(goto-char (window-start))
|
||||||
(while (re-search-forward (regexp-quote str) (window-end) t)
|
(setq regex (regexp-quote str))
|
||||||
|
(while (re-search-forward regex (window-end) t)
|
||||||
|
(unless (get-char-property (point) 'invisible)
|
||||||
(let ((ov (make-overlay (match-beginning 0) (match-end 0))))
|
(let ((ov (make-overlay (match-beginning 0) (match-end 0))))
|
||||||
(push ov overlays)
|
(push ov overlays)
|
||||||
(overlay-put ov 'window (selected-window))
|
(overlay-put ov 'window (selected-window))
|
||||||
(overlay-put ov 'face 'avy-goto-char-timer-face))))))
|
(overlay-put ov 'face 'avy-goto-char-timer-face)))))))
|
||||||
str)
|
str)
|
||||||
(dolist (ov overlays)
|
(dolist (ov overlays)
|
||||||
(delete-overlay ov)))))
|
(delete-overlay ov)))))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user