branch: elpa/helm
commit 4666945ba10bfb1a720eb88ed01d2debb3e273ab
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>

    DRY in previous commit
---
 helm-core.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/helm-core.el b/helm-core.el
index ba1df2c4d03..4de6448f5f7 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -2534,11 +2534,12 @@ when you want the `display-to-real' function(s) to be 
applied."
              ;; this happen with grep sentinel sending an
              ;; error message in helm-buffer when no matches.
              (disp (unless (= beg end)
-                     (if (eq force-display-part 'noicon)
-                         ;; Remove icon if some from display see issue#2743.
-                         (replace-regexp-in-string
-                          "^[^[:ascii:]][ \t]*" "" (funcall disp-fn beg (1- 
end)))
-                       (funcall disp-fn beg (1- end)))))
+                     (helm-acase (funcall disp-fn beg (1- end))
+                         ((guard* (eq force-display-part 'noicon))
+                          ;; Remove icon if some from display see issue#2743.
+                          (replace-regexp-in-string
+                           "^[^[:ascii:]][ \t]*" "" it))
+                         (t it))))
              (src  (or source (helm-get-current-source)))
              (selection (helm-acond (force-display-part disp)
                                     ;; helm-realvalue always takes precedence

Reply via email to