Skip to content

Cursor invisible in vterm copy-mode when using vterm's native keybinding (C-c C-t) #118

@gmg48

Description

@gmg48

The cursor disappears when entering vterm copy-mode using vterm's native keybinding C-c C-t, making it difficult to select text. When entering copy-mode through claude-code.el's keybinding C-c c z, the cursor remains visible as expected.

Steps to reproduce:

  1. Set claude-code.el to use vterm
  2. Start Claude Code with C-c c c
  3. Press C-c C-t (vterm's native copy-mode keybinding)
  4. Observe that the cursor is not visible
  5. Press C-c c z and observe that the cursor is visible now

Expected Behavior:

Cursor should remain visible in copy-mode regardless of which keybinding is used to enter it.

Workaround:

Adding this hook restores cursor visibility:

(add-hook 'vterm-copy-mode-hook
            (lambda ()
              (when (string-prefix-p "*claude:" (buffer-name))
                (setq-local cursor-type (if vterm-copy-mode t nil)))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions