MCPcopy Create free account
hub / github.com/Noumena-Network/code / markNoSelectRegion

Function markNoSelectRegion

src/ink/screen.ts:1839–1854  ·  view source on GitHub ↗
(
  screen: Screen,
  x: number,
  y: number,
  width: number,
  height: number,
)

Source from the content-addressed store, hash-verified

1837 * only getSelectedText/applySelectionOverlay which read it directly.
1838 */
1839export function markNoSelectRegion(
1840 screen: Screen,
1841 x: number,
1842 y: number,
1843 width: number,
1844 height: number,
1845): void {
1846 const maxX = Math.min(x + width, screen.width)
1847 const maxY = Math.min(y + height, screen.height)
1848 const noSel = screen.noSelect
1849 const stride = screen.width
1850 for (let row = Math.max(0, y); row < maxY; row++) {
1851 const rowStart = row * stride
1852 noSel.fill(1, rowStart + Math.max(0, x), rowStart + maxX)
1853 }
1854}

Callers 1

getMethod · 0.85

Calls 1

maxMethod · 0.80

Tested by

no test coverage detected