branch: master
commit e23c175a4986f57487c5947a5f81a2346a46c9b9
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    Insert intermediate candidates during async completions
    
    * counsel.el (counsel--async-filter): Update.
    
    Fixes #340
---
 counsel.el |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/counsel.el b/counsel.el
index e9baba0..c99b801 100644
--- a/counsel.el
+++ b/counsel.el
@@ -596,9 +596,12 @@ Update the minibuffer with the amount of lines collected 
every
            (time-since counsel--async-time))
       (with-current-buffer (process-buffer process)
         (goto-char (point-min))
-        (setq size (- (buffer-size) (forward-line (buffer-size)))))
-      (ivy--insert-minibuffer
-       (format "\ncollected: %d" size))
+        (setq size (- (buffer-size) (forward-line (buffer-size))))
+        (setq ivy--all-candidates
+              (split-string (buffer-string) "\n" t)))
+      (let ((ivy--prompt (format "%d++ ag:" size)))
+        (ivy--insert-minibuffer
+         (ivy--format ivy--all-candidates)))
       (setq counsel--async-time (current-time)))))
 
 (defun counsel-locate-action-extern (x)

Reply via email to