MCPcopy Create free account
hub / github.com/continuedev/continue / getFirstChangedLine

Function getFirstChangedLine

extensions/vscode/src/diff/vertical/util.ts:3–14  ·  view source on GitHub ↗
(
  diff: DiffLine[],
  startLine: number,
)

Source from the content-addressed store, hash-verified

1import { DiffLine } from "core";
2
3export function getFirstChangedLine(
4 diff: DiffLine[],
5 startLine: number,
6): number | null {
7 for (let i = 0; i < diff.length; i++) {
8 const item = diff[i];
9 if (item.type === "old" || item.type === "new") {
10 return startLine + i;
11 }
12 }
13 return null;
14}

Callers 2

instantApplyDiffMethod · 0.90
runMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected