Commit fd09412
fix: prevent clipboard overwrite on single click without selection (#124)
The mouseup handler in SelectionManager was calling copyToClipboard()
without first checking hasSelection(), causing single clicks on terminal
cells to copy the character at that position to the clipboard. This
overwrote the user's clipboard contents unexpectedly.
Added a hasSelection() guard in the mouseup handler to match the pattern
already used in the public copySelection() API.
Fixes #108
Co-authored-by: Yansu <no-reply@yansu.ai>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 77e29d9 commit fd09412
1 file changed
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
557 | 559 | | |
558 | 560 | | |
559 | 561 | | |
| |||
0 commit comments