diff options
Diffstat (limited to 'helm-utils.el')
-rw-r--r-- | helm-utils.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/helm-utils.el b/helm-utils.el index b2de8a62..5c7d34e9 100644 --- a/helm-utils.el +++ b/helm-utils.el @@ -446,15 +446,19 @@ To use this add it to `helm-goto-line-before-hook'." (push-mark (point) 'nomsg)))) (defun helm-show-all-in-this-source-only (arg) - "Show only current source of this helm session with all its candidates. -With a numeric prefix arg show only the ARG number of candidates." + "Toggle all or only candidate-number-limit cands in current source. +With a numeric prefix arg show only the ARG number of candidates. +The prefix arg have no effect when toggling to only +candidate-number-limit." (interactive "p") (with-helm-alive-p (with-helm-window - (with-helm-default-directory (helm-default-directory) - (let ((helm-candidate-number-limit (and (> arg 1) arg))) - (helm-set-source-filter - (list (assoc-default 'name (helm-get-current-source))))))))) + (if helm-source-filter + (helm-set-source-filter nil) + (with-helm-default-directory (helm-default-directory) + (let ((helm-candidate-number-limit (and (> arg 1) arg))) + (helm-set-source-filter + (list (helm-get-current-source))))))))) (put 'helm-show-all-in-this-source-only 'helm-only t) (defun helm-display-all-sources () |