MCPcopy
hub / github.com/codeaashu/claude-code / subscribeToSelectionChange

Method subscribeToSelectionChange

src/ink/ink.tsx:1244–1247  ·  view source on GitHub ↗

* Subscribe to selection state changes. Fires whenever the selection * is started, updated, cleared, or copied. Returns an unsubscribe fn.

(cb: () => void)

Source from the content-addressed store, hash-verified

1242 * is started, updated, cleared, or copied. Returns an unsubscribe fn.
1243 */
1244 subscribeToSelectionChange(cb: () => void): () => void {
1245 this.selectionListeners.add(cb);
1246 return () => this.selectionListeners.delete(cb);
1247 }
1248 private notifySelectionChange(): void {
1249 this.onRender();
1250 for (const cb of this.selectionListeners) cb();

Callers 1

useSelectionFunction · 0.80

Calls 2

deleteMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected