fix(web): copy terminal selection instead of a blank clipboard #7678
Mergedsethwebster(GitHub profile, opens in a new tab)merged 4 commits into
main fromrefs/pull/7678/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/web/src/terminal/ghostty/surface.ts line 1139Resolvedby sethwebster(GitHub profile, opens in a new tab)@@ -1073,11 +1111,4 @@10731111 }1074111210751113 private readonly onCopyEvent = (event: ClipboardEvent) => {1076- if (!this.hasSelection()) return;1077- event.preventDefault();1078- event.clipboardData?.setData("text/plain", this.getSelection());1079- // The native event beat any deferred write; drop the in-flight fallback.1080- this.copyShortcutToken += 1;1081- if (this.clearSelectionAfterCopy) {1082- this.clearSelectionAfterCopy = false;1083- this.clearSelection();1114+ const selection = this.hasSelection() ? this.getSelection() : this.input.value;
- apps/web/src/terminal/ghostty/surface.ts line 1029OutdatedResolvedby sethwebster(GitHub profile, opens in a new tab)@@ -989,3 +1026,4 @@9891026 this.suppressedKeyCodes.add(event.code);9901027 return;9911028 }1029+ clearPrimedTerminalCopyInput(this.input);
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.


Important
Review skipped#
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
2024b8b0-be58-4576-971c-2e68e52df2c2You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share