MCPcopy Create free account
hub / github.com/anomalyco/opencode / position

Function position

packages/tui/src/editor-zed.ts:268–273  ·  view source on GitHub ↗
(line: number, lineStart: number, offset: number)

Source from the content-addressed store, hash-verified

266}
267
268function position(line: number, lineStart: number, offset: number) {
269 return {
270 line,
271 character: offset - lineStart + 1,
272 }
273}
274
275function pathContains(parent: string, child: string) {
276 const relative = path.relative(path.resolve(parent), path.resolve(child))

Callers 2

offsetsToSelectionFunction · 0.85
AutocompleteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected