[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 4e0c3f1 019/167: swiper-avy: show avy hints in minibuffer
From: |
Oleh Krehel |
Subject: |
[elpa] master 4e0c3f1 019/167: swiper-avy: show avy hints in minibuffer as well |
Date: |
Tue, 08 Dec 2015 10:49:38 +0000 |
branch: master
commit 4e0c3f1132f16039e909301590661fb36063bf15
Author: PythonNut <address@hidden>
Commit: Oleh Krehel <address@hidden>
swiper-avy: show avy hints in minibuffer as well
---
swiper.el | 46 +++++++++++++++++++++++++++++++++++++---------
1 files changed, 37 insertions(+), 9 deletions(-)
diff --git a/swiper.el b/swiper.el
index 19d0a59..09c266e 100644
--- a/swiper.el
+++ b/swiper.el
@@ -141,16 +141,44 @@
"Jump to one of the current swiper candidates."
(interactive)
(unless (string= ivy-text "")
- (with-ivy-window
- (let* ((avy-all-windows nil)
- (candidates
- (avy--regex-candidates
- (ivy--regex ivy-text)))
- (avy-background nil)
- (candidate
- (avy--process candidates #'avy--overlay-post)))
+ (let* ((avy-all-windows nil)
+ (candidates (append
+ (with-ivy-window
+ (avy--regex-candidates
+ (ivy--regex ivy-text)))
+ (save-excursion
+ (save-restriction
+ (narrow-to-region (window-start) (window-end))
+ (goto-char (point-min))
+ (forward-line)
+ (let ((cands))
+ (while (< (point) (point-max))
+ (push (cons (1+ (point))
+ (selected-window))
+ cands)
+ (forward-line))
+ cands)))))
+ (candidate (unwind-protect
+ (prog2
+ (avy--make-backgrounds
+ (append (avy-window-list)
+ (list (ivy-state-window ivy-last))))
+ (if (eq avy-style 'de-bruijn)
+ (avy-read-de-bruijn
+ candidates avy-keys)
+ (avy-read (avy-tree candidates avy-keys)
+ #'avy--overlay-post
+ #'avy--remove-leading-chars))
+ (avy-push-mark))
+ (avy--done))))
+ (if (window-minibuffer-p (cdr candidate))
+ (progn
+ (ivy-set-index (- (line-number-at-pos (car candidate)) 2))
+ (ivy--exhibit)
+ (ivy-done)
+ (ivy-call))
(ivy-quit-and-run
- (avy-action-goto candidate))))))
+ (avy-action-goto (caar candidate)))))))
(defun swiper-recenter-top-bottom (&optional arg)
"Call (`recenter-top-bottom' ARG)."
- [elpa] master 73e5799 012/167: Fix counsel-git-grep not updating to 0 candidates, (continued)
- [elpa] master 73e5799 012/167: Fix counsel-git-grep not updating to 0 candidates, Oleh Krehel, 2015/12/08
- [elpa] master dfb41d0 016/167: Implement ivy-avy, Oleh Krehel, 2015/12/08
- [elpa] master eda091b 017/167: Customize ivy-avy and fix compile warnings, Oleh Krehel, 2015/12/08
- [elpa] master fa49a81 018/167: Fix "End of buffer" for swiper and visual-line-mode, Oleh Krehel, 2015/12/08
- [elpa] master 1714220 022/167: swiper.el (swiper-font-lock-ensure): Exclude help-mode, Oleh Krehel, 2015/12/08
- [elpa] master 6db3d54 024/167: ivy.el (ivy--insert-prompt): Use newlines instead of truncation, Oleh Krehel, 2015/12/08
- [elpa] master 1c1e6fc 008/167: ivy.el (ivy--reset-state): Less strict on :preselect, Oleh Krehel, 2015/12/08
- [elpa] master c89c167 007/167: Specify shell command for counsel-git-grep with prefix arg, Oleh Krehel, 2015/12/08
- [elpa] master ff077c6 013/167: counsel.el (counsel--gg-candidates): Use counsel-git-grep-cmd, Oleh Krehel, 2015/12/08
- [elpa] master cbaa811 014/167: Use forward-line instead of line-move if possible, Oleh Krehel, 2015/12/08
- [elpa] master 4e0c3f1 019/167: swiper-avy: show avy hints in minibuffer as well,
Oleh Krehel <=
- [elpa] master 52c9565 020/167: swiper.el (swiper--candidates): Avoid line-move for large buffers, Oleh Krehel, 2015/12/08
- [elpa] master 47a220d 023/167: Support hash tables in ivy-read, Oleh Krehel, 2015/12/08
- [elpa] master 21b9edf 021/167: Fix up visual-line-mode limitation logic, Oleh Krehel, 2015/12/08
- [elpa] master 126158d 025/167: ivy.el (ivy--filter): Anchor only for swiper, Oleh Krehel, 2015/12/08
- [elpa] master 800e640 028/167: Fix "M-o k" when switching buffers, Oleh Krehel, 2015/12/08
- [elpa] master b9d0502 026/167: ivy.el (ivy--filter): Fix typo, Oleh Krehel, 2015/12/08
- [elpa] master 6956311 027/167: Adjust ivy-state-preselect for file name completion, Oleh Krehel, 2015/12/08
- [elpa] master 6f4d46b 034/167: Fix preselect for input "^", Oleh Krehel, 2015/12/08
- [elpa] master ef189f1 030/167: ivy.el (ivy-count-format): Extend customize choices, Oleh Krehel, 2015/12/08
- [elpa] master e722d6a 046/167: swiper.el (swiper-mc): Add and bind to "C-7", Oleh Krehel, 2015/12/08