[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 513c429 41/78: Make avy-goto-char-timer faster for org-mod
From: |
Oleh Krehel |
Subject: |
[elpa] master 513c429 41/78: Make avy-goto-char-timer faster for org-mode |
Date: |
Sat, 23 Jan 2016 13:59:58 +0000 |
branch: master
commit 513c42991c658226aa598e63e0d53837e6df642f
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Make avy-goto-char-timer faster for org-mode
* avy.el (avy--read-string-timer): Use `avy--find-visible-regions'.
(avy-goto-char-timer): Make ARG work properly to negate
`avy-all-windows'.
Re #100
---
avy.el | 28 ++++++++++++++++++----------
1 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/avy.el b/avy.el
index 1291834..8296def 100644
--- a/avy.el
+++ b/avy.el
@@ -1132,15 +1132,18 @@ read string immediately instead of waiting for another
char for
(window-list)
(list (selected-window))))
(with-selected-window win
- (save-excursion
- (goto-char (window-start))
- (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)))))))))
+ (dolist (pair (avy--find-visible-regions
+ (window-start)
+ (window-end (selected-window) t)))
+ (save-excursion
+ (goto-char (car pair))
+ (setq regex (regexp-quote str))
+ (while (re-search-forward regex (cdr pair) 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)))))
@@ -1150,7 +1153,12 @@ read string immediately instead of waiting for another
char for
"Read one or many consecutive chars and jump to the first one.
The window scope is determined by `avy-all-windows' (ARG negates it)."
(interactive "P")
- (let ((str (avy--read-string-timer)))
+ (let ((str
+ (let ((avy-all-windows
+ (if arg
+ (not avy-all-windows)
+ avy-all-windows)))
+ (avy--read-string-timer))))
(avy-with avy-goto-char-timer
(avy--generic-jump
(regexp-quote str)
- [elpa] master bda04b2 35/78: Properly highlight depending on avy-all-windows, (continued)
- [elpa] master bda04b2 35/78: Properly highlight depending on avy-all-windows, Oleh Krehel, 2016/01/23
- [elpa] master c879498 38/78: New commands avy-goto-line-above and avy-goto-line-below, Oleh Krehel, 2016/01/23
- [elpa] master 248bff0 37/78: avy.el (avy--regex-candidates): Simplify, Oleh Krehel, 2016/01/23
- [elpa] master d439b9d 34/78: avy.el (avy--overlay-at-full): Avoid negative length, Oleh Krehel, 2016/01/23
- [elpa] master 70bd6ce 36/78: Search only in the visible region, Oleh Krehel, 2016/01/23
- [elpa] master f7ddd4b 39/78: Fix jumping to the last char of a folded Org outline, Oleh Krehel, 2016/01/23
- [elpa] master 528125e 40/78: avy.el (avy--process): Add window to candidates if not present, Oleh Krehel, 2016/01/23
- [elpa] master df181f1 44/78: avy.el (avy--read-candidates): Use avy-window-list, Oleh Krehel, 2016/01/23
- [elpa] master 964664c 45/78: Fix jumping to the last char of a folded Org outline, Oleh Krehel, 2016/01/23
- [elpa] master 0a18a45 43/78: avy.el (avy--read-candidates): Fix reverse order, Oleh Krehel, 2016/01/23
- [elpa] master 513c429 41/78: Make avy-goto-char-timer faster for org-mode,
Oleh Krehel <=
- [elpa] master f28d238 46/78: Fix for combined org-indent-mode and visual-line-mode, Oleh Krehel, 2016/01/23
- [elpa] master 2313410 42/78: Optimize avy-goto-char-timer, Oleh Krehel, 2016/01/23
- [elpa] master 0166808 47/78: Beep when there are no matches, Oleh Krehel, 2016/01/23
- [elpa] master 2d07a49 50/78: Make avy--overlay-at use avy--overlay, Oleh Krehel, 2016/01/23
- [elpa] master cf36a59 48/78: avy.el (avy--old-str): New defun., Oleh Krehel, 2016/01/23
- [elpa] master 3257d81 49/78: Add avy-candidate-* helper functions, Oleh Krehel, 2016/01/23
- [elpa] master 13377d9 51/78: avy.el (avy--update-offset-and-str): Split from avy--overlay-at-full, Oleh Krehel, 2016/01/23
- [elpa] master d4b693f 52/78: avy.el (avy--overlay): Take BEG END, instead of only BEG, Oleh Krehel, 2016/01/23
- [elpa] master 567570a 54/78: Fix 'at-full moving text when visual-line-mode is on, Oleh Krehel, 2016/01/23
- [elpa] master 0756c0b 53/78: avy.el (avy--overlay-at-full): Use avy--overlay, Oleh Krehel, 2016/01/23