refactor(corfu): use tty child frames in 31+

Since 31.1 child frames are now supported on TTY frames.
This supports use-cases like Posframe, Corfu, and child frames acting
like tooltips.
`corfu-terminal` package should be only loaded on older versions.

Ref: emacs-mirror/emacs@a8c83b496b
Ref: emacs-mirror/emacs@8aef5d224a
This commit is contained in:
Alejandro Blasco
2025-08-21 15:13:44 +02:00
committed by GitHub
parent 3ab397b520
commit 52e867d386
2 changed files with 3 additions and 1 deletions

View File

@@ -209,6 +209,7 @@ This function respects the value of `+corfu-want-minibuffer-completion':
(use-package! corfu-terminal
:when (modulep! :os tty)
:unless (featurep 'tty-child-frames)
:hook ((corfu-mode . corfu-terminal-mode)))

View File

@@ -11,7 +11,8 @@
;; save contributor headaches we should only pin vertico's orderless and leave
;; this one unpinned.
(package! orderless))
(when (modulep! :os tty)
(when (and (modulep! :os tty)
(not (featurep 'tty-child-frames)))
(package! corfu-terminal :pin "501548c3d51f926c687e8cd838c5865ec45d03cc"))
(when (modulep! :editor snippets)
(package! yasnippet-capf :pin "f53c42a996b86fc95b96bdc2deeb58581f48c666"))