aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-05 14:48:43 -0500
committerCraig Jennings <c@cjennings.net>2026-06-05 14:48:43 -0500
commit8024a29a82c26035b46c9e426dc56ba4a191056d (patch)
tree89165c6b6d0e2548184d89342779e3537ce5e7cc /tests
parentd4b10932ace93e5e243934c3dd2d2f6d1c29b782 (diff)
downloaddotemacs-8024a29a82c26035b46c9e426dc56ba4a191056d.tar.gz
dotemacs-8024a29a82c26035b46c9e426dc56ba4a191056d.zip
fix(term): forward F10 and C-F10 to Emacs in ghostel buffers
Inside a ghostel terminal or agent buffer, semi-char mode forwarded F10 and C-F10 to the pty, so the music-playlist toggle and the server-shutdown command never ran. Both are global bindings with no ghostel-mode-map entry, so I added them to ghostel-keymap-exceptions and rebuilt the semi-char map. The lookup then falls through to the global map. Same shape as the earlier F9, F12, and window-nav fixes.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-term-tmux-history.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test-term-tmux-history.el b/tests/test-term-tmux-history.el
index 1bb7e73b..b7ab5351 100644
--- a/tests/test-term-tmux-history.el
+++ b/tests/test-term-tmux-history.el
@@ -327,6 +327,17 @@ instead of being forwarded to the terminal program."
(should-not (eq (keymap-lookup ghostel-semi-char-mode-map "C-M-<left>")
'ghostel--send-event)))
+(ert-deftest test-term-f10-music-and-shutdown-in-keymap-exceptions ()
+ "Regression: F10 (music playlist toggle) and C-F10 (server shutdown) are in
+`ghostel-keymap-exceptions' so they reach Emacs from inside a ghostel buffer
+instead of being forwarded to the terminal program. Both are global bindings,
+so dropping them from the semi-char map lets the lookup fall through to the
+global map."
+ (dolist (key '("<f10>" "C-<f10>"))
+ (should (member key ghostel-keymap-exceptions)))
+ (should-not (eq (keymap-lookup ghostel-semi-char-mode-map "<f10>")
+ 'ghostel--send-event)))
+
(ert-deftest test-term-c-spc-forwarded-not-set-mark ()
"Regression: C-SPC is forwarded to the terminal, not bound to the global
`set-mark-command'. ghostel only forwards the `C-@' event, so without this an