emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master acdd9e8 33/78: Modify avy--read-string-timer


From: Oleh Krehel
Subject: [elpa] master acdd9e8 33/78: Modify avy--read-string-timer
Date: Sat, 23 Jan 2016 13:59:53 +0000

branch: master
commit acdd9e8b3d6ff8ada6138e489883907948c23fe7
Author: momomo5717 <address@hidden>
Commit: momomo5717 <address@hidden>

    Modify avy--read-string-timer
---
 avy.el |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/avy.el b/avy.el
index b0b038f..ae9eee2 100644
--- a/avy.el
+++ b/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
 read string immediately instead of waiting for another char for
 `avy-timeout-seconds'."
-  (let ((str "") char break overlays)
+  (let ((str "") char break overlays regex)
     (unwind-protect
         (progn
           (while (and (not break)
@@ -1077,11 +1077,13 @@ read string immediately instead of waiting for another 
char for
             (when (>= (length str) 1)
               (save-excursion
                 (goto-char (window-start))
-                (while (re-search-forward (regexp-quote str) (window-end) t)
-                  (let ((ov (make-overlay (match-beginning 0) (match-end 0))))
-                    (push ov overlays)
-                    (overlay-put ov 'window (selected-window))
-                    (overlay-put ov 'face 'avy-goto-char-timer-face))))))
+                (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))))
+                      (push ov overlays)
+                      (overlay-put ov 'window (selected-window))
+                      (overlay-put ov 'face 'avy-goto-char-timer-face)))))))
           str)
       (dolist (ov overlays)
         (delete-overlay ov)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]