From 0b3542bc1518d43b45165bd66c1fda03eeff8bcb Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 20 Nov 2026 16:20:30 -0600 Subject: feat(keys): move the terminal to C-; t and the test runner to C-; T I'm in the terminal far more than I run tests, so it gets the easier key. - The terminal commands move from C-; x to C-; t. - The test runner moves from C-; t to C-; T. - C-; x is now unbound. - The terminal prefix gains a which-key label. --- tests/test-term-tmux-history.el | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'tests/test-term-tmux-history.el') diff --git a/tests/test-term-tmux-history.el b/tests/test-term-tmux-history.el index a5f5c93c..5e2bc52c 100644 --- a/tests/test-term-tmux-history.el +++ b/tests/test-term-tmux-history.el @@ -3,7 +3,7 @@ ;;; Commentary: ;; Exercises the terminal UX carried into eat-config for the EAT agent ;; terminals: the Emacs-owned tmux history buffer, the copy-mode-dwim engine -;; pick, the tmux pane-id / attached-client predicates, and the C-; x menu +;; pick, the tmux pane-id / attached-client predicates, and the C-; t menu ;; bindings. Agents run EAT over tmux, so copy-mode is tmux's own copy-mode. ;; ;; eat is required (so eat-config's `with-eval-after-load' fires for the C- @@ -263,10 +263,16 @@ up-arrow -- it does not re-enter and reset the cursor." ;;; bindings (ert-deftest test-term-keymap-history-and-copy-bindings () - "Normal: the C-; x terminal map owns the tmux-history and copy-mode commands." - (should (eq (keymap-lookup cj/custom-keymap "x h") #'cj/term-tmux-history)) - (should (eq (keymap-lookup cj/custom-keymap "x c") #'cj/term-copy-mode-dwim)) - (should (eq (keymap-lookup cj/custom-keymap "x t") #'cj/term-toggle))) + "Normal: the C-; t terminal map owns the tmux-history and copy-mode commands." + (should (eq (keymap-lookup cj/custom-keymap "t") cj/term-map)) + (should (eq (keymap-lookup cj/custom-keymap "t h") #'cj/term-tmux-history)) + (should (eq (keymap-lookup cj/custom-keymap "t c") #'cj/term-copy-mode-dwim)) + (should (eq (keymap-lookup cj/custom-keymap "t d") #'cj/term-tmux-detach)) + (should (eq (keymap-lookup cj/custom-keymap "t t") #'cj/term-toggle))) + +(ert-deftest test-term-keymap-old-x-prefix-is-gone () + "Boundary: the terminal map no longer answers on its old C-; x prefix." + (should-not (eq (keymap-lookup cj/custom-keymap "x") cj/term-map))) (ert-deftest test-term-copy-mode-up-bound-in-eat-semi-char-map () "Normal: C- enters copy-mode + scrolls up from inside an EAT terminal." -- cgit v1.2.3