Skip to content

Commit cdec3b6

Browse files
committed
transient--show: Fix window height for more setups
It is desirable to set `window-size-fixed' to t in the transient menu, as we always used to do, until very recently. We cannot do this when the transient window uses the full height of the frame, the minibuffer may be used while the menu remains displayed, and the height of the minibuffer has to be increased so that the completion framework can display completion candidates. If `transient-hide-during-minibuffer-read' is t [1], then that cannot happen, so we fix the size in that case again. [1] Which is the default, starting with the parent of this commit. Re #532.
1 parent 1d974b8 commit cdec3b6

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

lisp/transient.el

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ buffer became the current buffer, then that would change what is
211211
at point. To that effect `inhibit-same-window' ensures that the
212212
selected window is not used to show the transient buffer.
213213
214+
The use of a horizonal split to display the menu window can lead
215+
to incompatibilities and is thus discouraged. Transient tries to
216+
mitigate such issue but cannot proactively deal with all possible
217+
configurations and combinations of third-party packages.
218+
214219
It may be possible to display the window in another frame, but
215220
whether that works in practice depends on the window-manager.
216221
If the window manager selects the new window (Emacs frame),
@@ -3740,7 +3745,14 @@ have a history of their own.")
37403745
(erase-buffer)
37413746
(when transient-force-fixed-pitch
37423747
(transient--force-fixed-pitch))
3743-
(setq window-size-fixed (if (window-full-height-p) 'width t))
3748+
(setq window-size-fixed
3749+
;; If necessary, make sure the height of the minibuffer
3750+
;; can be increased to display completion candidates.
3751+
;; See https://github.com/minad/vertico/issues/532.
3752+
(if (and (not transient-hide-during-minibuffer-read)
3753+
(window-full-height-p))
3754+
'width
3755+
t))
37443756
(when (bound-and-true-p tab-line-format)
37453757
(setq tab-line-format nil))
37463758
(setq header-line-format nil)

0 commit comments

Comments
 (0)