diff options
| author | Craig Jennings <c@cjennings.net> | 2026-07-02 00:00:47 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-07-02 00:00:47 -0400 |
| commit | 622a4d8c13a5037e064cf9caa3e917100f7f5cc9 (patch) | |
| tree | 933e7efb483f16e379a15aa282e3fc1584b6ce79 /tests | |
| parent | 37d92510afbaea8609e8aa3612c6e9d27edba12d (diff) | |
| download | dotemacs-622a4d8c13a5037e064cf9caa3e917100f7f5cc9.tar.gz dotemacs-622a4d8c13a5037e064cf9caa3e917100f7f5cc9.zip | |
fix(keybindings): retire the two-column F2 and C-x 6 bindings
A grazed F2 followed by a stray 2, s, or b invokes two-column mode, which replaces the buffer's mode-line-format with its own retro layout and spawns a 2C/ companion buffer. That's what mangled the modeline in an agent terminal: eat semi-char buffers don't forward F2, so the prefix was armed everywhere. Nothing of mine uses global F2 (markdown-mode's binding lives in its own map), so I unbound both routes to 2C-command. cj/modeline-reset repairs a hijacked buffer.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test-keybindings-two-column-unbound.el | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/test-keybindings-two-column-unbound.el b/tests/test-keybindings-two-column-unbound.el new file mode 100644 index 00000000..f9bc2c52 --- /dev/null +++ b/tests/test-keybindings-two-column-unbound.el @@ -0,0 +1,26 @@ +;;; test-keybindings-two-column-unbound.el --- 2C-command is unbound -*- lexical-binding: t; -*- + +;;; Commentary: +;; Two-column mode's global F2 / C-x 6 prefix replaces a buffer's +;; mode-line-format with its own layout when triggered by a stray +;; keypress (the 2026-07-01 archsetup agent-buffer incident). +;; keybindings.el retires both bindings; these tests pin that. + +;;; Code: + +(require 'ert) + +(add-to-list 'load-path (expand-file-name "modules" user-emacs-directory)) + +(require 'keybindings) + +(ert-deftest test-keybindings-two-column-f2-unbound () + "Normal: F2 no longer reaches the 2C-command prefix." + (should-not (keymap-lookup global-map "<f2>"))) + +(ert-deftest test-keybindings-two-column-c-x-6-unbound () + "Normal: C-x 6 no longer reaches the 2C-command prefix." + (should-not (keymap-lookup global-map "C-x 6"))) + +(provide 'test-keybindings-two-column-unbound) +;;; test-keybindings-two-column-unbound.el ends here |
