MCPcopy Create free account
hub / github.com/KDE/kate / diffLineToHunkLine

Method diffLineToHunkLine

apps/lib/diff/gitdiff.cpp:63–66  ·  view source on GitHub ↗

* Returns the index of the line within the hunk * * @param diffLineIdx the 0-based index of the line in the diff * * @note assumes that the line is contained within the hunk * @note if the line is a header line, -1 is returned; otherwise the returned * number is the index of the line in the `lines` list */

Source from the content-addressed store, hash-verified

61 * number is the index of the line in the `lines` list
62 */
63 int diffLineToHunkLine(uint diffLineIdx) const
64 {
65 return diffLineIdx - (headingLineIdx + 1);
66 }
67
68 /**
69 * A helper method to construct a hunk header from the provided info

Callers 1

mapDiffLineMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected