MCPcopy Index your code
hub / github.com/codeaashu/claude-code / copySelection

Method copySelection

src/ink/ink.tsx:1033–1039  ·  view source on GitHub ↗

* Copy the current text selection to the system clipboard via OSC 52 * and clear the selection. Returns the copied text (empty if no selection).

()

Source from the content-addressed store, hash-verified

1031 * and clear the selection. Returns the copied text (empty if no selection).
1032 */
1033 copySelection(): string {
1034 if (!hasSelection(this.selection)) return '';
1035 const text = this.copySelectionNoClear();
1036 clearSelection(this.selection);
1037 this.notifySelectionChange();
1038 return text;
1039 }
1040
1041 /** Clear the current text selection without copying. */
1042 clearTextSelection(): void {

Callers 2

copyAndToastFunction · 0.80
useSelectionFunction · 0.80

Calls 4

copySelectionNoClearMethod · 0.95
notifySelectionChangeMethod · 0.95
hasSelectionFunction · 0.85
clearSelectionFunction · 0.85

Tested by

no test coverage detected