[BUG] the new screen handler cannot highlight+paste on linux with X11
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Executing claude (2.1.183). I was asked whether to try the new screen handler. Running linux v6.18.5 with xorg-server 21.1.23 I'm unable to cut+paste: highlighting text and middle-pressing in the same or other windows gives me the last thing that was copied. This is not Windows, it is not MacOS... the highlight+paste is an intrinsic part of X11.
Even attempting to use ^C/^V fails -- largely because ^C is trapped by the CLI for exiting.
What Should Happen?
Highlighting text, moving the cursor to a new position, and pressing the middle button (a.k.a., 'button 2' or a "middle click") should paste the highlighted text.
Error Messages/Logs
Steps to Reproduce
/opt/bin/claude;
Answer 'Y' to using the new screen handler.
Type the phrase "Hello, World!" into the prompt without pressing Enter.
Move the cursor to the "H", with the left button held down sweep the cursor to "!".
Notice that the phrase has been highlighted.
Move the cursor to a new location in the current window or a shell terminal window nearby on the screen.
Press the middle button.
It does not paste the highlighted text.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.183 (Claude Code)
Claude Code Version
2.1.183 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Xterm
Additional Information
This works with the old screen handler in the current version.
Whomever designed it is used to Windows/MacOS where the display buffer is not used for cut+paste, a separate cut buffer is used for that purpose.