MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / imageRefEndingAt

Method imageRefEndingAt

src/utils/Cursor.ts:300–303  ·  view source on GitHub ↗

* If an [Image #N] chip ends at `offset`, return its bounds. Used by left() * to hop the cursor over the chip instead of stepping into it.

(offset: number)

Source from the content-addressed store, hash-verified

298 * to hop the cursor over the chip instead of stepping into it.
299 */
300 imageRefEndingAt(offset: number): { start: number; end: number } | null {
301 const m = this.text.slice(0, offset).match(/\[Image #\d+\]$/)
302 return m ? { start: offset - m[0].length, end: offset } : null
303 }
304
305 imageRefStartingAt(offset: number): { start: number; end: number } | null {
306 const m = this.text.slice(offset).match(/^\[Image #\d+\]/)

Callers 1

leftMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected