[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master d4b693f 52/78: avy.el (avy--overlay): Take BEG END, instea
From: |
Oleh Krehel |
Subject: |
[elpa] master d4b693f 52/78: avy.el (avy--overlay): Take BEG END, instead of only BEG |
Date: |
Sat, 23 Jan 2016 14:00:11 +0000 |
branch: master
commit d4b693f274b389c826771767f69e33299190d5df
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
avy.el (avy--overlay): Take BEG END, instead of only BEG
* avy.el (avy--overlay):
(avy--overlay-pre):
(avy--overlay-at):
(avy--overlay-post): Update.
Previously, END was implied to be (1+ BEG).
---
avy.el | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/avy.el b/avy.el
index ac862d9..9e05c9f 100644
--- a/avy.el
+++ b/avy.el
@@ -621,13 +621,13 @@ When GROUP is non-nil, (BEG . END) should delimit that
regex group."
(propertize old-str 'face 'avy-background-face)
old-str)))
-(defun avy--overlay (str pt wnd &optional compose-fn)
- "Create an overlay with STR at PT in WND.
-COMPOSE-FN is a lambda that concatenates the old string at PT with STR."
- (when (<= (1+ pt) (with-selected-window wnd (point-max)))
- (let* ((pt (+ pt avy--overlay-offset))
- (ol (make-overlay pt (1+ pt) (window-buffer wnd)))
- (old-str (avy--old-str pt wnd))
+(defun avy--overlay (str beg end wnd &optional compose-fn)
+ "Create an overlay with STR from BEG to END in WND.
+COMPOSE-FN is a lambda that concatenates the old string at BEG with STR."
+ (when (<= (1+ beg) (with-selected-window wnd (point-max)))
+ (let* ((beg (+ beg avy--overlay-offset))
+ (ol (make-overlay beg (or end (1+ beg)) (window-buffer wnd)))
+ (old-str (avy--old-str beg wnd))
(os-line-prefix (get-text-property 0 'line-prefix old-str))
(os-wrap-prefix (get-text-property 0 'wrap-prefix old-str)))
(when os-line-prefix
@@ -691,7 +691,7 @@ LEAF is normally ((BEG . END) . WND)."
str))
(avy--overlay
str
- (avy-candidate-beg leaf)
+ (avy-candidate-beg leaf) nil
(avy-candidate-wnd leaf))))
(defun avy--overlay-at (path leaf)
@@ -704,7 +704,7 @@ LEAF is normally ((BEG . END) . WND)."
'face 'avy-lead-face)))
(avy--overlay
str
- (avy-candidate-beg leaf)
+ (avy-candidate-beg leaf) nil
(avy-candidate-wnd leaf)
(lambda (str old-str)
(cond ((string= old-str "\n")
@@ -782,7 +782,7 @@ LEAF is normally ((BEG . END) . WND)."
str))
(avy--overlay
str
- (avy-candidate-end leaf)
+ (avy-candidate-end leaf) nil
(avy-candidate-wnd leaf))))
(defun avy--update-offset-and-str (offset str)
- [elpa] master 964664c 45/78: Fix jumping to the last char of a folded Org outline, (continued)
- [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, 2016/01/23
- [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 <=
- [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
- [elpa] master 1b78fb0 57/78: Improve the faces for the last change, Oleh Krehel, 2016/01/23
- [elpa] master dddce37 55/78: Fix 'at-full moving text for chars near end of visual line, Oleh Krehel, 2016/01/23
- [elpa] master edf1259 58/78: avy.el (avy--read-candidates): Use avy-dowindows, Oleh Krehel, 2016/01/23
- [elpa] master 9ae4413 56/78: Fix overlays at end-of-line with visual-line-mode, Oleh Krehel, 2016/01/23
- [elpa] master f341c2f 59/78: avy.el (avy--find-visible-regions): Add bounds safety, Oleh Krehel, 2016/01/23
- [elpa] master a041429 62/78: avy.el (avy-copy-region): Obey avy-line-insert-style, Oleh Krehel, 2016/01/23
- [elpa] master 54074c7 65/78: avy.el (avy-all-windows-alt): New defcustom, Oleh Krehel, 2016/01/23
- [elpa] master 54fb4d6 61/78: avy.el (avy-line-insert-style): Customize avy-copy-line, avy-move-line, Oleh Krehel, 2016/01/23