[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 119a151 242/272: Make "j"/"k" feedback more solid in ivy-o
From: |
Oleh Krehel |
Subject: |
[elpa] master 119a151 242/272: Make "j"/"k" feedback more solid in ivy-occur buffers |
Date: |
Mon, 25 Apr 2016 10:13:28 +0000 |
branch: master
commit 119a15123f035d16ed35f96e9002911c724d5e9b
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Make "j"/"k" feedback more solid in ivy-occur buffers
* ivy.el (ivy-occur-timer): New defvar.
(ivy-occur-press): Do the overlays also for `counsel-grep'. Put
`swiper--cleanup' on a 1 second timer.
Tip: pressing "c" in *ivy-occur* buffers toggles to "calling state".
When in the calling state, "j" and "k" will auto-follow the candidate.
---
ivy.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/ivy.el b/ivy.el
index d5ce2b4..7052f48 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2912,6 +2912,7 @@ EVENT gives the mouse position."
(declare-function swiper--cleanup "swiper")
(declare-function swiper--add-overlays "swiper")
+(defvar ivy-occur-timer nil)
(defun ivy-occur-press ()
"Execute action for the current candidate."
@@ -2944,7 +2945,7 @@ EVENT gives the mouse position."
(cdr (assoc str coll))
str))
(if (memq (ivy-state-caller ivy-last)
- '(swiper counsel-git-grep))
+ '(swiper counsel-git-grep counsel-grep))
(with-current-buffer (window-buffer (selected-window))
(swiper--cleanup)
(swiper--add-overlays
@@ -2952,7 +2953,9 @@ EVENT gives the mouse position."
(line-beginning-position)
(line-end-position)
(selected-window))
- (run-at-time 0.5 nil 'swiper--cleanup)))))))
+ (when (timerp ivy-occur-timer)
+ (cancel-timer ivy-occur-timer))
+ (setq ivy-occur-timer (run-at-time 1.0 nil
'swiper--cleanup))))))))
(defvar ivy-help-file (let ((default-directory
(if load-file-name
- [elpa] master 668aaf3 155/272: counsel.el: add outline for `counsel-mode', (continued)
- [elpa] master 668aaf3 155/272: counsel.el: add outline for `counsel-mode', Oleh Krehel, 2016/04/25
- [elpa] master 2a13932 252/272: counsel.el (counsel-grep-or-swiper): New command, Oleh Krehel, 2016/04/25
- [elpa] master 0b51e8e 231/272: ivy.el (ivy-minibuffer-map): Fix "DEL", Oleh Krehel, 2016/04/25
- [elpa] master cf78d42 212/272: counsel.el (counsel-find-file): Add :caller, Oleh Krehel, 2016/04/25
- [elpa] master a25e174 248/272: ivy.el (ivy--format-minibuffer-line): Add ignore-errors, Oleh Krehel, 2016/04/25
- [elpa] master ebd3fb9 254/272: Fix read-file-name with specified dir, Oleh Krehel, 2016/04/25
- [elpa] master 7dc86b3 084/272: Add a lot of sections to the documentation, Oleh Krehel, 2016/04/25
- [elpa] master d2a89ea 261/272: doc/ivy.org: Add a note on :predicate, Oleh Krehel, 2016/04/25
- [elpa] master 63a77ba 162/272: swiper.el (swiper-occur): Fix for non-file buffers, Oleh Krehel, 2016/04/25
- [elpa] master d899181 199/272: README.md: Add a section on Contributing, Oleh Krehel, 2016/04/25
- [elpa] master 119a151 242/272: Make "j"/"k" feedback more solid in ivy-occur buffers,
Oleh Krehel <=
- [elpa] master 6a00275 187/272: ivy.el (ivy-switch-buffer-occur): Add, Oleh Krehel, 2016/04/25
- [elpa] master 181cd43 154/272: Add counsel-mode, Oleh Krehel, 2016/04/25
- [elpa] master 92b802f 176/272: counsel.el (counsel-ag): Add dir prompt for "C-u", Oleh Krehel, 2016/04/25
- [elpa] master 4998ba8 208/272: ivy.el (ivy-completing-read): Use the "t" key of ivy-sort-functions-alist, Oleh Krehel, 2016/04/25
- [elpa] master 4ac3736 243/272: New feature: virtual views in ivy-switch-buffer, Oleh Krehel, 2016/04/25
- [elpa] master 46a00dc 227/272: Modified ivy to pass predicate when selecting buffers, Oleh Krehel, 2016/04/25
- [elpa] master b48a09d 245/272: Use Ivy to browse eshell and shell history entries, Oleh Krehel, 2016/04/25
- [elpa] master e7f41bb 236/272: swiper.el (swiper-mc): Remove interactive, Oleh Krehel, 2016/04/25
- [elpa] master 147ae80 096/272: Fix an extra action being called for `completing-read', Oleh Krehel, 2016/04/25
- [elpa] master c4b9e25 249/272: Add much faster scrolling to counsel-grep, Oleh Krehel, 2016/04/25