MCPcopy Create free account
hub / github.com/KDE/kdiff3 / convertLineCoordsToD3LCoords

Method convertLineCoordsToD3LCoords

src/difftextwindow.cpp:1568–1586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1566}
1567
1568void DiffTextWindow::convertLineCoordsToD3LCoords(LineRef line, qsizetype pos, LineType& d3LIdx, qsizetype& d3LPos) const
1569{
1570 if(d->m_bWordWrap && !d->m_diff3WrapLineVector.empty())
1571 {
1572 d3LPos = pos;
1573 d3LIdx = convertLineToDiff3LineIdx(line);
1574 LineRef wrapLine = convertDiff3LineIdxToLine(d3LIdx); // First wrap line belonging to this d3LIdx
1575 while(wrapLine < line)
1576 {
1577 d3LPos += d->m_diff3WrapLineVector[wrapLine].wrapLineLength;
1578 ++wrapLine;
1579 }
1580 }
1581 else
1582 {
1583 d3LPos = pos;
1584 d3LIdx = line;
1585 }
1586}
1587
1588void DiffTextWindow::setSelection(LineRef firstLine, qsizetype startPos, LineRef lastLine, qsizetype endPos)
1589{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected