branch: elpa/helm commit 4a5fa703463baa7797e2a86ed3c4832720ea6a85 Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Always use the dummy-source in helm-mode This allow handling must-match properly. --- helm-mode.el | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/helm-mode.el b/helm-mode.el index d10373f60d..8df9a1684f 100644 --- a/helm-mode.el +++ b/helm-mode.el @@ -963,8 +963,7 @@ that use `helm-comp-read'. See `helm-M-x' for example." (setq src-list (cl-loop for src in src-list collect (cons '(nomark) src)))) (when reverse-history (setq src-list (nreverse src-list))) - (unless (eq must-match t) - (setq src-list (append src-list (list dummy-src)))) + (setq src-list (append src-list (list dummy-src))) (when raw-candidate (cl-loop for src in src-list do (helm-set-attr 'raw-candidate t src))) @@ -2161,19 +2160,17 @@ Keys description: "helm-confirm-and-exit-minibuffer" helm-read-file-name-mode-line-string)) (dummy-src - (unless (eq must-match t) - ;; Non existing file or dir source. - (helm-build-dummy-source "New file or directory" - :keymap 'helm-read-file-map - :must-match must-match - :all-marked all-marked - :nomark nomark - :filtered-candidate-transformer - (lambda (_candidates _source) - (unless (file-exists-p helm-pattern) - (list (helm-ff-filter-candidate-one-by-one - helm-pattern nil t)))) - :action action-fn))) + (helm-build-dummy-source "New file or directory" + :keymap 'helm-read-file-map + :must-match must-match + :all-marked all-marked + :nomark nomark + :filtered-candidate-transformer + (lambda (_candidates _source) + (unless (file-exists-p helm-pattern) + (list (helm-ff-filter-candidate-one-by-one + helm-pattern nil t)))) + :action action-fn)) (src-list (list ;; History source.