Text selection highlight for copying messages is not cleared when clicking and releasing without dragging #1333

Closed
opened 2026-02-16 17:30:29 -05:00 by yindo · 1 comment
Owner

Originally created by @yihuikhuu on GitHub (Aug 16, 2025).

There is a sporadic issue that sometimes happens when running opencode in tmux, where clicking on message text and releasing without dragging causes the user to be stuck in a text selection state. Moving the mouse around in this state causes text to be highlighted even though mouse is not held down. Clicking clears the highlight (without copying text) but moving the mouse will create a new highlight. The user can only get out of this state by successfully triggering a copy by clicking and dragging. Accidentally clicking anywhere in the messages causes the issue again.

This is an odd bug because I've only observed it in tmux sessions, but creating a fresh tmux session does not have this issue. However, once the issue presents (trigger unknown), it happens across all panes in that tmux session and persists even after detaching/reattaching to that same session.

https://github.com/user-attachments/assets/ffd92fd4-9fb2-4d3f-979e-57defc283a18

Originally created by @yihuikhuu on GitHub (Aug 16, 2025). There is a sporadic issue that sometimes happens when running opencode in tmux, where clicking on message text and releasing without dragging causes the user to be stuck in a text selection state. Moving the mouse around in this state causes text to be highlighted even though mouse is not held down. Clicking clears the highlight (without copying text) but moving the mouse will create a new highlight. The user can only get out of this state by successfully triggering a copy by clicking and dragging. Accidentally clicking anywhere in the messages causes the issue again. This is an odd bug because I've only observed it in tmux sessions, but creating a fresh tmux session does not have this issue. However, once the issue presents (trigger unknown), it happens across all panes in that tmux session and persists even after detaching/reattaching to that same session. https://github.com/user-attachments/assets/ffd92fd4-9fb2-4d3f-979e-57defc283a18
yindo closed this issue 2026-02-16 17:30:29 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 16, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #1210: Mouse text selection has unexpected behavior in terminal - this was about mouse selection issues and was marked as fixed, but may be related to your selection state problems
  • #1857: Syntax highlighting breaks for non-English text with file links, selection also behaves incorrectly - mentions text selection behaving incorrectly with misaligned highlighting
  • #1946: Tmux formatting issues - discusses various tmux-specific display problems
  • #1660: bug (tui): trouble highlighting assistant messages - shows highlighting issues in the UI

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Aug 16, 2025): This issue might be a duplicate of existing issues. Please check: - #1210: Mouse text selection has unexpected behavior in terminal - this was about mouse selection issues and was marked as fixed, but may be related to your selection state problems - #1857: Syntax highlighting breaks for non-English text with file links, selection also behaves incorrectly - mentions text selection behaving incorrectly with misaligned highlighting - #1946: Tmux formatting issues - discusses various tmux-specific display problems - #1660: bug (tui): trouble highlighting assistant messages - shows highlighting issues in the UI Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1333