aboutsummaryrefslogtreecommitdiff
path: root/tests/test-ai-vterm--reuse-edge-window.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-31 16:20:34 -0500
committerCraig Jennings <c@cjennings.net>2026-05-31 16:20:34 -0500
commit4e924fddebf3ccbfe41fda437ef0ca02cfed4e58 (patch)
treefbf5b0c27c749eeb65b806ddc693eb2cd48f3199 /tests/test-ai-vterm--reuse-edge-window.el
parentda012721c84117c83b11ea52176a5032d187e442 (diff)
downloaddotemacs-4e924fddebf3ccbfe41fda437ef0ca02cfed4e58.tar.gz
dotemacs-4e924fddebf3ccbfe41fda437ef0ca02cfed4e58.zip
feat(ai-vterm): gate the F9 launcher to GUI frames
AI-vterm launches a graphical vterm side window, so F9 / C-F9 / M-F9 now decline with a message in a terminal frame instead of opening a vterm. The guard checks the current frame at command time rather than at load. That matters under the daemon, which serves GUI and terminal frames both with display-graphic-p nil at load, so a load-time gate would have disabled the launcher in its GUI frames too. Routed the three window-behavior tests through a GUI-frame stub, since a batch run is itself a terminal frame.
Diffstat (limited to 'tests/test-ai-vterm--reuse-edge-window.el')
-rw-r--r--tests/test-ai-vterm--reuse-edge-window.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test-ai-vterm--reuse-edge-window.el b/tests/test-ai-vterm--reuse-edge-window.el
index a7009423a..9f6214771 100644
--- a/tests/test-ai-vterm--reuse-edge-window.el
+++ b/tests/test-ai-vterm--reuse-edge-window.el
@@ -175,7 +175,7 @@ window count stays 2 (the native `quit-restore-window' puts 2 back)."
(should (= (count-windows) 2))
(should (member agent-name (cj/test--displayed-buffer-names)))
;; Toggle off -> the displaced buffer (2) returns to the slot.
- (cj/ai-vterm)
+ (cj/test--call-as-gui #'cj/ai-vterm)
(should (= (count-windows) 2))
(let ((bufs (cj/test--displayed-buffer-names)))
(should (member right-name bufs))
@@ -213,11 +213,11 @@ the same width."
(display-buffer agent-buf)
(should (= (count-windows) 2))
;; off
- (cj/ai-vterm)
+ (cj/test--call-as-gui #'cj/ai-vterm)
(should (= (count-windows) 2))
(should-not (cj/--ai-vterm-displayed-agent-window))
;; on again
- (cj/ai-vterm)
+ (cj/test--call-as-gui #'cj/ai-vterm)
(should (= (count-windows) 2))
(let ((win (cj/--ai-vterm-displayed-agent-window)))
(should (windowp win))
@@ -259,9 +259,9 @@ most-recent agent, which would now be the other one."
(display-buffer a2) ; | left | A2 |
(should (eq (window-buffer (cj/--ai-vterm-displayed-agent-window))
a2))
- (cj/ai-vterm) ; off -> | left | right |
+ (cj/test--call-as-gui #'cj/ai-vterm) ; off -> | left | right |
(should-not (cj/--ai-vterm-displayed-agent-window))
- (cj/ai-vterm) ; on -> must bring A2 back
+ (cj/test--call-as-gui #'cj/ai-vterm) ; on -> must bring A2 back
(should (eq (window-buffer (cj/--ai-vterm-displayed-agent-window))
a2))))))
(when (get-buffer left-name) (kill-buffer left-name))