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

    Avoid repetition in process filter fn
---
 helm-core.el | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/helm-core.el b/helm-core.el
index 060b7e983f..7b433d0354 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -5558,17 +5558,15 @@ This will work only in Emacs-26+, i.e. Emacs versions 
that have
                          (split-string output
                                        
helm-process-output-split-string-separator t)
                          source t))
-    (let ((count 0))
+    (let ((count 0)
+          (ml    (assq 'multiline source))
+          (start (point)))
       (setq candidate
             (helm--maybe-process-filter-one-by-one-candidate candidate source))
-      (if (assq 'multiline source)
-          (let ((start (point)))
-            (helm-insert-candidate-separator)
-            (helm-insert-match candidate 'insert-before-markers
-                               (1+ count) source)
-            (put-text-property start (point) 'helm-multiline t))
-        (helm-insert-match candidate 'insert-before-markers
-                           (1+ count) source))
+      (and ml (helm-insert-candidate-separator))
+      (helm-insert-match candidate 'insert-before-markers
+                         (1+ count) source)
+      (and ml (put-text-property start (point) 'helm-multiline t))
       (cl-incf count)
       (when (>= count limit)
         (helm-kill-async-process process)

Reply via email to