branch: elpa/helm
commit be355adf1b1112713e36c8aa1c297e0441d4128a
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>
Use helm-initial-windows to define list of default in HFF actions
Pressing M-n provides default-directory of the live windows before
starting helm.
---
helm-files.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/helm-files.el b/helm-files.el
index f836ccf372a..e21511a4225 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -1378,10 +1378,11 @@ ACTION can be `rsync' or any action supported by
`helm-dired-action'."
ext)
cdir)))
dired-compress-files-alist)
- ;; Specify default-directory as default
- ;; otherwise we get thing-at-point from the
- ;; *helm marked* buffer.
- default-directory)
+ ;; List of all `default-directory' belonging
+ ;; to each visible windows before starting
helm.
+ (cl-loop for w in helm-initial-windows
collect
+ (with-selected-window w
+ default-directory)))
:must-match (and cdir (lambda (f) (not
(file-directory-p f))))
:initial-input (or cdir (helm-dwim-target-directory))
:history (helm-find-files-history nil :comp-read
nil))))))