diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2018-12-08 21:14:40 +0100 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2018-12-08 21:22:01 +0100 |
commit | b585eb3e51eef51a1e6180cc9fb16cf63bece302 (patch) | |
tree | fc5056cfe3df1925eed663c14bfb6059a5194793 /helm-utils.el | |
parent | e861743d369be2ad296c8fd788f11f66accbe72d (diff) |
Fix helm-set-source-filter and allow toggling
in helm-show-all-in-this-source-only.
* helm-utils.el (helm-show-all-in-this-source-only): Allow toggling.
* helm.el (helm-set-source-filter): Fix it, use helm-update.
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 () |