branch: elpa/helm
commit 3bb4dedf774ad03f9aa760636966c897df6c6329
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>

    New user variable helm-persistent-action-use-special-display
    
    Allow using user display-buffer-alist config in persistent actions.
---
 helm-core.el | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/helm-core.el b/helm-core.el
index 615c62e5c2..19054c90ae 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -903,6 +903,12 @@ You can toggle later `truncate-lines' with
 Set this to an empty string if you don't want prefix in margin when marking."
   :group 'helm
   :type 'string)
+
+(defcustom helm-persistent-action-use-special-display nil
+  "When non nil use user special `display-buffer-alist' config in PA."
+  :type 'boolean
+  :group 'helm)
+
 
 ;;; Faces
 ;;
@@ -6926,10 +6932,15 @@ splitting inconditionally, it is unused actually."
                 (helm-log "current-buffer = %S" (current-buffer))
                 (let ((helm-in-persistent-action t)
                       (same-window-regexps '("."))
+                      (display-buffer-alist (when 
helm-persistent-action-use-special-display
+                                              display-buffer-alist))
                       display-buffer-function pop-up-windows pop-up-frames
                       special-display-regexps special-display-buffer-names)
-                  (helm-execute-selection-action-1
-                   selection (or fn (helm-get-actions-from-current-source 
source)) t)
+                  (with-selected-window (if 
helm-persistent-action-use-special-display
+                                            (minibuffer-window)
+                                          (selected-window))
+                    (helm-execute-selection-action-1
+                     selection (or fn (helm-get-actions-from-current-source 
source)) t))
                   (unless (helm-action-window)
                     (helm-log-run-hook 'helm-after-persistent-action-hook)))
                 ;; A typical case is when a persistent action delete

Reply via email to