aboutsummaryrefslogtreecommitdiff
path: root/tests/test-vterm-toggle--dispatch.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-05 05:28:58 -0500
committerCraig Jennings <c@cjennings.net>2026-06-05 05:28:58 -0500
commitebdf9e466b0e1f86e9b7d76650ac32408273e7a7 (patch)
treedab9b453f3a93c324b5388b3843502a088c7ed46 /tests/test-vterm-toggle--dispatch.el
parentc094b2e4e64530379a9cb273303308a9affcabf6 (diff)
downloaddotemacs-ebdf9e466b0e1f86e9b7d76650ac32408273e7a7.tar.gz
dotemacs-ebdf9e466b0e1f86e9b7d76650ac32408273e7a7.zip
feat(term): replace vterm with ghostel as the terminal engine
I swapped the terminal engine from vterm to ghostel (libghostty-vt) everywhere. term-config replaces vterm-config (the F12 terminal, the C-; x menu, tmux history capture), and ai-term replaces ai-vterm (the F9 Claude-agent launcher). ghostel renders the agent TUI without vterm's flicker under heavy streaming, and one engine now covers every terminal workflow. Two behavior changes fall out of the swap. F9 launches in a terminal frame now: ghostel renders in TTY frames, so the old GUI-only guard is gone. Terminal windows no longer dim when unfocused: ghostel resolves its palette into the native module per-terminal, so there's no per-window color hook to dim through the way vterm had. auto-dim drops its vterm color-advice path, the dashboard Terminal button launches ghostel, and the vterm and vterm-toggle packages are removed. The tmux pane-history and copy-mode machinery carried over unchanged. It keys on the pty tty, which ghostel exposes.
Diffstat (limited to 'tests/test-vterm-toggle--dispatch.el')
-rw-r--r--tests/test-vterm-toggle--dispatch.el53
1 files changed, 0 insertions, 53 deletions
diff --git a/tests/test-vterm-toggle--dispatch.el b/tests/test-vterm-toggle--dispatch.el
deleted file mode 100644
index 7e87f2b1..00000000
--- a/tests/test-vterm-toggle--dispatch.el
+++ /dev/null
@@ -1,53 +0,0 @@
-;;; test-vterm-toggle--dispatch.el --- Tests for cj/--vterm-toggle-dispatch -*- lexical-binding: t; -*-
-
-;;; Commentary:
-;; Pure decision helper for F12. Returns one of (toggle-off . WIN),
-;; (show-recent . BUFFER), or (create-new) based on whether a vterm
-;; window is currently displayed and whether any vterm buffers are
-;; alive. Mocking the underlying helpers keeps the dispatch logic
-;; exercisable without touching real windows.
-
-;;; Code:
-
-(require 'ert)
-(require 'cl-lib)
-
-(add-to-list 'load-path (expand-file-name "modules" user-emacs-directory))
-(add-to-list 'load-path (expand-file-name "tests" user-emacs-directory))
-(require 'vterm-config)
-(require 'testutil-vterm-buffers)
-
-(ert-deftest test-vterm-toggle--dispatch-window-displayed-returns-toggle-off ()
- "Normal: displayed vterm window -> (toggle-off . WIN)."
- (let ((sentinel-win 'fake-window))
- (cl-letf (((symbol-function 'cj/--vterm-toggle-displayed-window)
- (lambda (&optional _frame) sentinel-win)))
- (should (equal (cj/--vterm-toggle-dispatch)
- (cons 'toggle-off sentinel-win))))))
-
-(ert-deftest test-vterm-toggle--dispatch-no-window-buffer-alive-returns-show-recent ()
- "Normal: no displayed vterm, at least one alive -> show-recent + first."
- (cj/test--kill-test-vterm-buffers)
- (let ((b1 (get-buffer-create "*test-vterm-mru-1*"))
- (b2 (get-buffer-create "*test-vterm-mru-2*")))
- (unwind-protect
- (cl-letf (((symbol-function 'cj/--vterm-toggle-displayed-window)
- (lambda (&optional _frame) nil))
- ((symbol-function 'cj/--vterm-toggle-buffers)
- (lambda () (list b1 b2))))
- (should (equal (cj/--vterm-toggle-dispatch)
- (cons 'show-recent b1))))
- (kill-buffer b1)
- (kill-buffer b2))))
-
-(ert-deftest test-vterm-toggle--dispatch-no-window-no-buffer-returns-create-new ()
- "Boundary: nothing displayed, no alive vterms -> create-new."
- (cj/test--kill-test-vterm-buffers)
- (cl-letf (((symbol-function 'cj/--vterm-toggle-displayed-window)
- (lambda (&optional _frame) nil))
- ((symbol-function 'cj/--vterm-toggle-buffers)
- (lambda () nil)))
- (should (equal (cj/--vterm-toggle-dispatch) '(create-new)))))
-
-(provide 'test-vterm-toggle--dispatch)
-;;; test-vterm-toggle--dispatch.el ends here