summaryrefslogtreecommitdiff
path: root/helm.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thievol@posteo.net>2021-10-04 16:27:31 +0200
committerThierry Volpiatto <thievol@posteo.net>2021-10-04 16:30:49 +0200
commit5facfbc813210744baf62e344803165f7fb5e5f0 (patch)
tree0d8debbfc0889d36c89bf69ade6bb551a7ef2497 /helm.el
parentb8ac55b65b750839e3c9c2616254021cad344be1 (diff)
Rename helm-use-frame-when-dedicated-window to
helm-use-frame-when-no-suitable-window and change its behavior so that helm use frame when current window is a dedicated window OR a side-window.
Diffstat (limited to 'helm.el')
-rw-r--r--helm.el26
1 files changed, 14 insertions, 12 deletions
diff --git a/helm.el b/helm.el
index 3fe727d8..5c22b4d4 100644
--- a/helm.el
+++ b/helm.el
@@ -879,7 +879,7 @@ Fallback to 100 when nil."
:group 'helm
:type 'boolean)
-(defcustom helm-use-frame-when-dedicated-window nil
+(defcustom helm-use-frame-when-no-suitable-window nil
"Display Helm buffer in frame when Helm is started from a dedicated window."
:group 'helm
:type 'boolean)
@@ -3304,17 +3304,19 @@ If `helm-initial-frame' has no minibuffer, use
Fallback to global value of `helm-display-function' when no local
value found and current command is not in
`helm-commands-using-frame'."
- (or (with-helm-buffer helm-display-function)
- (and (or (memq com helm-commands-using-frame)
- (and helm-use-frame-when-dedicated-window
- (window-dedicated-p (get-buffer-window helm-current-buffer)))
- (and helm-use-frame-when-more-than-two-windows
- (null helm--nested)
- (> (length (window-list)) 2))
- ;; Frame parameter is unreliable for minibuffer on emacs-26.
- (null (member helm-initial-frame (minibuffer-frame-list))))
- #'helm-display-buffer-in-own-frame)
- (default-value 'helm-display-function)))
+ (let ((win (get-buffer-window helm-current-buffer)))
+ (or (with-helm-buffer helm-display-function)
+ (and (or (memq com helm-commands-using-frame)
+ (and helm-use-frame-when-no-suitable-window
+ (or (window-dedicated-p win)
+ (window-parameter win 'window-side)))
+ (and helm-use-frame-when-more-than-two-windows
+ (null helm--nested)
+ (> (length (window-list)) 2))
+ ;; Frame parameter is unreliable for minibuffer on emacs-26.
+ (null (member helm-initial-frame (minibuffer-frame-list))))
+ #'helm-display-buffer-in-own-frame)
+ (default-value 'helm-display-function))))
(defun helm-display-buffer (buffer &optional resume)
"Display BUFFER.