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

    Simplify helm-top--skip-top-line
---
 helm-sys.el | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/helm-sys.el b/helm-sys.el
index a65f8eecbc..32b7687656 100644
--- a/helm-sys.el
+++ b/helm-sys.el
@@ -208,13 +208,12 @@ Return empty string for non--valid candidates."
                            (cons helm-top--line lst))))
 
 (defun helm-top--skip-top-line ()
-  (let* ((src (helm-get-current-source))
-         (src-name (assoc-default 'name src)))
-    (helm-aif (and (stringp src-name)
-                   (string= src-name "Top")
-                   (helm-get-selection nil t src))
-        (when (string-match-p "^ *PID" it)
-          (helm-next-line)))))
+  (let ((src (helm-get-current-source)))
+    (when (helm-aand (assoc-default 'name src)
+                     (string= it "Top")
+                     (helm-get-selection nil t src)
+                     (string-match-p "^ *PID" it))
+      (helm-next-line))))
 
 (defun helm-top-action-transformer (actions _candidate)
   "Action transformer for `top'.

Reply via email to