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 | c56a638192f3b6aff13c26e34ce78db0d26de6fc (patch) | |
| tree | 2b4405995125ad3da06d5c1d74b3a29062c20f56 /modules/vterm-config.el | |
| parent | a7cc492131361195ad08d433c64c7c76b255bc8c (diff) | |
| download | dotemacs-c56a638192f3b6aff13c26e34ce78db0d26de6fc.tar.gz dotemacs-c56a638192f3b6aff13c26e34ce78db0d26de6fc.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/vterm-config.el')
| -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 eb472c57..93a91915 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) |
