Search for the first visible line (search loop needed when no line exists for this file.)
| 2027 | |
| 2028 | // Search for the first visible line (search loop needed when no line exists for this file.) |
| 2029 | LineRef DiffTextWindow::calcTopLineInFile(const LineRef firstLine) const |
| 2030 | { |
| 2031 | LineRef currentLine; |
| 2032 | for(size_t i = convertLineToDiff3LineIdx(firstLine); i < d->getDiff3LineVector()->size(); ++i) |
| 2033 | { |
| 2034 | const Diff3Line* d3l = (*d->getDiff3LineVector())[i]; |
| 2035 | currentLine = d3l->getLineInFile(getWindowIndex()); |
| 2036 | if(currentLine.isValid()) break; |
| 2037 | } |
| 2038 | return currentLine; |
| 2039 | } |
| 2040 | |
| 2041 | void DiffTextWindowFrame::setFirstLine(const LineRef firstLine) |
| 2042 | { |
no test coverage detected