[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master a08b049 04/36: Fix jumping to newlines with at-full style
From: |
Oleh Krehel |
Subject: |
[elpa] master a08b049 04/36: Fix jumping to newlines with at-full style |
Date: |
Tue, 19 May 2015 12:38:07 +0000 |
branch: master
commit a08b049edde2dc1f6cf445d1e5a2d9e13535fc37
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Fix jumping to newlines with at-full style
* avy-jump.el (avy--overlay-at-full): Update.
Re #5
---
avy-jump.el | 36 +++++++++++++++++++++---------------
1 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/avy-jump.el b/avy-jump.el
index 125c821..93569d0 100644
--- a/avy-jump.el
+++ b/avy-jump.el
@@ -280,22 +280,28 @@ LEAF is normally ((BEG . END) . WND)."
(apply #'string (reverse path))
'face 'avy-lead-face))
(len (length path))
- (pt (if (consp (car leaf))
- (caar leaf)
- (car leaf)))
+ (beg (if (consp (car leaf))
+ (caar leaf)
+ (car leaf)))
(wnd (cdr leaf)))
- (let ((ol (make-overlay pt (+ pt len)
- (window-buffer wnd)))
- (old-str (with-selected-window wnd
- (buffer-substring pt (1+ pt)))))
- (when avy-background
- (setq old-str (propertize
- old-str 'face 'avy-background-face)))
- (overlay-put ol 'window wnd)
- (overlay-put ol 'display (if (string= old-str "\n")
- (concat str "\n")
- str))
- (push ol avy--overlays-lead))))
+ (with-selected-window wnd
+ (save-excursion
+ (goto-char beg)
+ (let* ((end (if (= beg (line-end-position))
+ (1+ beg)
+ (min (+ beg len) (line-end-position))))
+ (ol (make-overlay
+ beg end
+ (current-buffer)))
+ (old-str (buffer-substring beg (1+ beg))))
+ (when avy-background
+ (setq old-str (propertize
+ old-str 'face 'avy-background-face)))
+ (overlay-put ol 'window wnd)
+ (overlay-put ol 'display (if (string= old-str "\n")
+ (concat str "\n")
+ str))
+ (push ol avy--overlays-lead))))))
(defun avy--overlay-post (path leaf)
"Create an overlay with PATH at LEAF.
- [elpa] master updated (b525e2d -> e559638), Oleh Krehel, 2015/05/19
- [elpa] master c2e7de3 01/36: avy-jump.el (avy-goto-subword-0): Add nreverse, Oleh Krehel, 2015/05/19
- [elpa] master 05e5c4d 06/36: README.md: mention avy-goto-line -> goto-line, Oleh Krehel, 2015/05/19
- [elpa] master 755c25a 09/36: Add a new face for 'at-full style, Oleh Krehel, 2015/05/19
- [elpa] master cd8e626 02/36: avy-jump.el (avy-dowindows): Simplify, Oleh Krehel, 2015/05/19
- [elpa] master 3716cd0 03/36: avy-jump.el (avy-goto-subword-0): Update candidate order, Oleh Krehel, 2015/05/19
- [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 <=
- [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, 2015/05/19
- [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