diff --git a/lisp/transient.el b/lisp/transient.el index 383ab11..ee69ec4 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -3948,13 +3948,23 @@ have a history of their own.") (transient--fit-window-to-buffer transient--window))))) (defun transient--display-action () - (cond ((oref transient--prefix display-action)) - ((memq 'display-buffer-full-frame - (ensure-list (car transient-display-buffer-action))) - (user-error "%s disallowed in %s" - 'display-buffer-full-frame - 'transient-display-buffer-action)) - (transient-display-buffer-action))) + (let ((action + (cond ((oref transient--prefix display-action)) + ((memq 'display-buffer-full-frame + (ensure-list (car transient-display-buffer-action))) + (user-error "%s disallowed in %s" + 'display-buffer-full-frame + 'transient-display-buffer-action)) + (transient-display-buffer-action)))) + (when (assq 'pop-up-frame-parameters (cdr action)) + (setq action (copy-tree action)) + (pcase-let ((`(,height ,width) + (buffer-line-statistics transient--buffer)) + (params (assq 'pop-up-frame-parameters (cdr action)))) + (setf (alist-get 'height params) height) + (setf (alist-get 'width params) + (max width (or transient-minimal-frame-width 0))))) + action)) (defun transient--fit-window-to-buffer (window) (set-window-parameter window 'window-preserved-size nil)