[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/helm c4561f3cf0 6/7: Fix error in read-file-name when sour
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/helm c4561f3cf0 6/7: Fix error in read-file-name when source is empty |
Date: |
Sat, 17 Sep 2022 04:58:55 -0400 (EDT) |
branch: elpa/helm
commit c4561f3cf0a47303da7c0baab481a102ef6f523e
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>
Fix error in read-file-name when source is empty
---
helm-files.el | 18 +++++++++++-------
helm-mode.el | 1 +
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/helm-files.el b/helm-files.el
index f815b67451..895aea6940 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -2605,13 +2605,17 @@ If prefix numeric arg is given go ARG level up."
(let ((cur-cand (helm-get-selection nil nil src))
(new-pattern (helm-reduce-file-name helm-pattern arg)))
;; Ensure visibility on all candidates for preselection.
- (helm-set-attr 'candidate-number-limit
- (if helm-ff-up-one-level-preselect
- (max (gethash new-pattern
- helm-ff--directory-files-length
- helm-ff-candidate-number-limit)
- helm-ff-candidate-number-limit)
- helm-ff-candidate-number-limit))
+ (unless (helm-empty-source-p)
+ ;; We may have an empty source in read-file-name when a
+ ;; predicate is used e.g. images and the default is a non
+ ;; file image.
+ (helm-set-attr 'candidate-number-limit
+ (if helm-ff-up-one-level-preselect
+ (max (gethash new-pattern
+ helm-ff--directory-files-length
+ helm-ff-candidate-number-limit)
+ helm-ff-candidate-number-limit)
+ helm-ff-candidate-number-limit)))
(cond ((file-directory-p helm-pattern)
(setq helm-ff-last-expanded helm-ff-default-directory))
((file-exists-p helm-pattern)
diff --git a/helm-mode.el b/helm-mode.el
index d0af930bdc..8de1a18de7 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -1435,6 +1435,7 @@ Keys description:
:mode-line mode-line
:help-message 'helm-read-file-name-help-message
:nohighlight t
+ :candidate-number-limit 'helm-ff-candidate-number-limit
:candidates
(lambda ()
(if test
- [nongnu] elpa/helm updated (c3cd741a27 -> 2b44a1da5c), ELPA Syncer, 2022/09/17
- [nongnu] elpa/helm 587be477fe 4/7: Allow inserting code before running action in helm-make-command-from-action, ELPA Syncer, 2022/09/17
- [nongnu] elpa/helm 6184d8b40d 5/7: Make two new commands with helm-make-command-from-action, ELPA Syncer, 2022/09/17
- [nongnu] elpa/helm 9a637b9f02 1/7: Set helm-only directly in make command macros, ELPA Syncer, 2022/09/17
- [nongnu] elpa/helm f41131dd9d 3/7: Remove all helm-only property settings, ELPA Syncer, 2022/09/17
- [nongnu] elpa/helm c04edbc678 2/7: Bind mcp action to key, ELPA Syncer, 2022/09/17
- [nongnu] elpa/helm c4561f3cf0 6/7: Fix error in read-file-name when source is empty,
ELPA Syncer <=
- [nongnu] elpa/helm 2b44a1da5c 7/7: Add some more commands to helm-read-file-map, ELPA Syncer, 2022/09/17