diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-10 12:23:14 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-10 12:23:14 -0500 |
| commit | a3e58dd0487242719e2567612821d700db99b4b3 (patch) | |
| tree | 2b4405995125ad3da06d5c1d74b3a29062c20f56 /modules | |
| parent | 9a08f714ac4c35f6f0b023cdf1a3b1fb33294ad2 (diff) | |
| download | dotemacs-a3e58dd0487242719e2567612821d700db99b4b3.tar.gz dotemacs-a3e58dd0487242719e2567612821d700db99b4b3.zip | |
fix(vterm): use a block cursor in vterm-copy-mode
The 3-pixel bar was visible but a block matches the rest of my Emacs cursor and lets the standard cursor color and `blink-cursor-mode' behavior carry through unchanged. Same enter/exit semantics: forced visible on entry, buffer-local override killed on exit so the live terminal goes back to the TUI's chosen state.
Update the test expectations and rename the "prior-was-box" boundary test to "prior-was-hbar" so it still proves the override does something (the prior and the override would otherwise both be `box').
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/vterm-config.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/vterm-config.el b/modules/vterm-config.el index eb472c574..93a919158 100644 --- a/modules/vterm-config.el +++ b/modules/vterm-config.el @@ -388,12 +388,12 @@ The vterm C module sets `cursor-type' to nil whenever the underlying TUI sends DECTCEM (`\\e[?25l') to hide the terminal cursor — typical for full-screen TUIs like Claude Code. In `vterm-copy-mode' the user is navigating the buffer, not watching the TUI, so the cursor must -be visible. Switches to a 3-pixel bar (drawn between characters -rather than inverting one) so face-heavy TUI output doesn't hide it -either. On exit, kills the buffer-local override so vterm's normal +be visible. Switches to a `box' so the cursor color and blinking +behavior follow Emacs's normal cursor-face / `blink-cursor-mode' +defaults. On exit, kills the buffer-local override so vterm's normal cursor-visibility tracking resumes." (if vterm-copy-mode - (setq-local cursor-type '(bar . 3)) + (setq-local cursor-type 'box) (kill-local-variable 'cursor-type))) (add-hook 'vterm-copy-mode-hook #'cj/--vterm-copy-mode-restore-cursor) |
