From 949bdeb3ac4d7b027cdd88efd54cc8c121f8c5d3 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 11 May 2026 10:02:17 -0500 Subject: feat(vterm): unify the keys in vterm copy-mode and tmux history `vterm-copy-mode' and the `C-; x h' tmux-history buffer now share one key story. `M-w' copies the active region and stays put, so I can copy several things in a row. `C-g', `', or `q' leaves (resuming the live terminal, or closing the history buffer) without copying. `RET' is unbound (no special "copy and exit"). In copy-mode that meant removing vterm's default `RET' -> `vterm-copy-mode-done' binding. Before, `M-w' exited and copied as it went, which made grabbing more than one selection awkward. The history buffer's `cj/vterm-tmux-history-copy-and-quit' was the copy-and-exit one-shot. It's gone. `M-w' then `q' is the equivalent. I also moved `cj/vterm-tmux-history' from `C-; x C' to `C-; x h' (unshifted, and it frees `C') and refreshed the file's stale commentary header, which still referenced the old `C-; V' prefix and `'. --- tests/test-vterm-copy-mode-cursor.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/test-vterm-copy-mode-cursor.el') diff --git a/tests/test-vterm-copy-mode-cursor.el b/tests/test-vterm-copy-mode-cursor.el index 49625405..c549a44f 100644 --- a/tests/test-vterm-copy-mode-cursor.el +++ b/tests/test-vterm-copy-mode-cursor.el @@ -81,9 +81,10 @@ restore function -- not just the helper in isolation." (should-not (local-variable-p 'cursor-type)))) (ert-deftest test-vterm-copy-mode-cursor-end-to-end-via-copy-done () - "Normal: `vterm-copy-mode-done' (M-w / RET binding) toggles copy-mode -off and triggers cursor restoration. This is the path the user takes -most often -- copy and exit in one keystroke." + "Normal: `vterm-copy-mode-done' toggles copy-mode off and triggers cursor +restoration. No key is bound to it in this config (M-w copies and stays; +RET is unbound), but it stays reachable via \\[execute-extended-command] +and its exit path must still restore the cursor." (test-vterm-copy-mode-cursor--in-fake-vterm-buffer (setq-local cursor-type nil) (vterm-copy-mode 1) -- cgit v1.2.3