MCPcopy Create free account
hub / github.com/coder/ghostty-web / hasSelection

Method hasSelection

lib/selection-manager.ts:209–217  ·  view source on GitHub ↗

* Check if there's an active selection

()

Source from the content-addressed store, hash-verified

207 * Check if there's an active selection
208 */
209 hasSelection(): boolean {
210 if (!this.selectionStart || !this.selectionEnd) return false;
211
212 // Check if start and end are the same (single cell, no real selection)
213 return !(
214 this.selectionStart.col === this.selectionEnd.col &&
215 this.selectionStart.absoluteRow === this.selectionEnd.absoluteRow
216 );
217 }
218
219 /**
220 * Clear the selection

Callers 2

clearSelectionMethod · 0.95
attachEventListenersMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected