[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b602a56 17/36: Stop 'at-full from shifting text
From: |
Oleh Krehel |
Subject: |
[elpa] master b602a56 17/36: Stop 'at-full from shifting text |
Date: |
Tue, 19 May 2015 12:38:13 +0000 |
branch: master
commit b602a560be17d8f0ac8147053ee104173a92fd9f
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Stop 'at-full from shifting text
* avy.el (avy-read): Call DISPLAY-FN in buffer's reverse order.
(avy--overlay-at-full): When there's an avy overlay after point, shorten
the current overlay to one letter.
Re #5
---
avy.el | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/avy.el b/avy.el
index 17e8260..17caaf5 100644
--- a/avy.el
+++ b/avy.el
@@ -219,7 +219,12 @@ CLEANUP-FN should take no arguments and remove the effects
of
multiple DISPLAY-FN invokations."
(catch 'done
(while tree
- (avy-traverse tree display-fn)
+ (let ((avy--leafs nil))
+ (avy-traverse tree
+ (lambda (path leaf)
+ (push (cons path leaf) avy--leafs)))
+ (dolist (x avy--leafs)
+ (funcall display-fn (car x) (cdr x))))
(let ((char (read-char))
branch)
(funcall cleanup-fn)
@@ -417,6 +422,11 @@ LEAF is normally ((BEG . END) . WND)."
(with-selected-window wnd
(save-excursion
(goto-char beg)
+ (when (cl-some (lambda (o)
+ (eq (overlay-get o 'category) 'avy))
+ (overlays-at (1+ (point))))
+ (setq str (substring str 0 1))
+ (setq len 1))
(let* ((end (if (= beg (line-end-position))
(1+ beg)
(min (+ beg len) (line-end-position))))
@@ -428,6 +438,7 @@ LEAF is normally ((BEG . END) . WND)."
(setq old-str (propertize
old-str 'face 'avy-background-face)))
(overlay-put ol 'window wnd)
+ (overlay-put ol 'category 'avy)
(overlay-put ol 'display (if (string= old-str "\n")
(concat str "\n")
str))
- [elpa] master dfbf0e2 13/36: targets/avy-init.el: Update, (continued)
- [elpa] master dfbf0e2 13/36: targets/avy-init.el: Update, Oleh Krehel, 2015/05/19
- [elpa] master 60dd24b 12/36: Update avy-jump mentions in the README, Oleh Krehel, 2015/05/19
- [elpa] master a08b049 04/36: Fix jumping to newlines with at-full style, Oleh Krehel, 2015/05/19
- [elpa] master eed8f6f 15/36: avy.el (avy--regex-candidates): Add optional group arg, Oleh Krehel, 2015/05/19
- [elpa] master 0d83599 16/36: Update group name, Oleh Krehel, 2015/05/19
- [elpa] master ca69b1f 14/36: Add debug declarations, Oleh Krehel, 2015/05/19
- [elpa] master a53ffb7 05/36: Allow to break from `avy-goto-line' into `goto-line', Oleh Krehel, 2015/05/19
- [elpa] master ca302b4 08/36: targets/avy-init.el: Move, Oleh Krehel, 2015/05/19
- [elpa] master b0512fc 21/36: avy.el (avy--overlay-at): Use `avy--overlay-offset', Oleh Krehel, 2015/05/19
- [elpa] master 04d26c4 07/36: avy-jump.el (avy-case-fold-search): New defcustom, Oleh Krehel, 2015/05/19
- [elpa] master b602a56 17/36: Stop 'at-full from shifting text,
Oleh Krehel <=
- [elpa] master ea6f5c5 25/36: Customize how `avy-lead-face-0' is applied, Oleh Krehel, 2015/05/19
- [elpa] master 8efed40 20/36: Add `avy-lead-face-1' for dimmed matched chars, Oleh Krehel, 2015/05/19
- [elpa] master 410c4ac 11/36: Merge avy-jump.el into avy.el, Oleh Krehel, 2015/05/19
- [elpa] master 7433f30 18/36: With 'at-full style, use full len to check for overlap, Oleh Krehel, 2015/05/19
- [elpa] master f0694a2 23/36: Remove empty line after original one being moved, Oleh Krehel, 2015/05/19
- [elpa] master 1127467 24/36: avy.el (avy-move-line): Use ARG lines, Oleh Krehel, 2015/05/19
- [elpa] master 2e936d8 10/36: avy-jump.el (avy-goto-word-or-subword-1): New command, Oleh Krehel, 2015/05/19
- [elpa] master e35f1ed 19/36: Use `avy-lead-face-0' for 'pre and 'post, Oleh Krehel, 2015/05/19
- [elpa] master a39f689 22/36: Allow all kinds of styles for `avy-goto-line', Oleh Krehel, 2015/05/19
- [elpa] master 92a7884 32/36: avy.el (avy-window-list): Fixup last commit, Oleh Krehel, 2015/05/19