Clicking on any terminal cell triggers SelectionManager.copyToClipboard, even when there's no text selected. This overwrites the user's clipboard with empty or single-character content unexpectedly.
The issue is in SelectionManager - copyToClipboard is called without checking if there's an actual selection (start cell ≠ end cell).
Proposed fix - check hasSelection() before copying:
async copyToClipboard(text: string) {
if (!this.hasSelection()) {
return;
}
// existing copy logic
}
Note: This fix was developed during an AI-assisted session and is currently used as a monkey-patch in our application. Due to time constraints we're unable to submit a proper PR, but wanted to share the finding.