Closed manateelazycat closed 1 month ago
@twlz0ne 大佬说, tty-child-frames lsp-bridge 啥都不用做, 直接可以支持。
等待 tty-child-frames 分支合并到 master 就可以了
如果现在就想体验,可以在配置文件加入以下 advice 以防止补全菜单窗口在意想不到的时间/位置被激活:
(advice-add 'select-frame :around
(defun select-frame@recover-invisble (orig-fn frame &optional norecord)
"Advice around `select-frame' to recover the invisible state of FRAME.
The reason for this advice is that the `select-frame' will change the visibility
of FRAME, and the issue still exists in the latest code: https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=scratch/tty-child-frames&id=9b8d1e0addeca9b508324537e7743d0af508a630 (2024-10-23)"
(let ((visible (frame-visible-p frame)))
(prog1 (funcall orig-fn frame norecord)
(unless visible
(make-frame-invisible frame))))))
或者屏蔽 https://github.com/emacs-mirror/emacs/blob/9b8d1e0addeca9b508324537e7743d0af508a630/src/frame.c#L1732 这行代码重新编译。这行代码在 tty-child-frames
分支之前就存在了,所以我也不太清楚会有什么副作用。
⚠️ 以上两种方法均未经过严格测试,请谨慎使用。
https://github.com/tumashu/posframe/commit/a31476cbe0df3cfffad7efeda84700a13d7ebc01