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

    Add helm-get-nth-action docstring and make test
    
    more readable.
---
 helm-core.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/helm-core.el b/helm-core.el
index 1b03b70e9b..be071c5bc2 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -7238,12 +7238,14 @@ Possible values are \\='left \\='right \\='below or 
\\='above."
     (helm-maybe-exit-minibuffer)))
 
 (defun helm-get-nth-action (n action)
+  "Return the nth N action from ACTION.
+Argument ACTION can be a symbol or a list of actions."
   (cond ((and (zerop n) (functionp action))
          action)
         ((listp action)
          (or (cdr (elt action n))
              (error "No such action")))
-        ((and (functionp action) (< 0 n))
+        ((and (functionp action) (> n 0))
          (error "Sole action"))
         (t
          (error "Error in `helm-select-nth-action'"))))

Reply via email to