branch: elpa/helm
commit 474abc30c04fbd24b2d8efa4d1e8873e2f62806e
Author: Thierry Volpiatto <thie...@posteo.net>
Commit: Thierry Volpiatto <thie...@posteo.net>

    pop lines directly instead of doing it at end of loop
---
 helm-core.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/helm-core.el b/helm-core.el
index ba978b73b4..9620b4b189 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -5550,16 +5550,15 @@ This will work only in Emacs-26+, i.e. Emacs versions 
that have
             (while lines
               (if (not (cdr lines))
                   ;; store last incomplete line until new output arrives
-                  (setcdr incomplete-line-info (car lines))
+                  (setcdr incomplete-line-info (pop lines))
                 (helm-aif (cdr incomplete-line-info)
                     (progn
-                      (push (concat it (car lines)) candidates)
+                      (push (concat it (pop lines)) candidates)
                       ;; Previously we were setting incomplete-line-info to 
line
                       ;; and latter to (concat incomplete-line-info line) to 
fix
                       ;; Bug#1187, it seems both were wrong.
                       (setcdr incomplete-line-info nil))
-                  (push (car lines) candidates)))
-              (pop lines))
+                  (push (pop lines) candidates))))
             ;; Transform candidates.
             (setq candidates (helm-transform-candidates
                               (nreverse candidates) source t))

Reply via email to