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

Method convertD3LCoordsToLineCoords

src/difftextwindow.cpp:1547–1566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1545}
1546
1547void DiffTextWindow::convertD3LCoordsToLineCoords(LineType d3LIdx, qsizetype d3LPos, LineRef& line, qsizetype& pos) const
1548{
1549 if(d->m_bWordWrap)
1550 {
1551 qsizetype wrapPos = d3LPos;
1552 LineRef wrapLine = convertDiff3LineIdxToLine(d3LIdx);
1553 while(wrapPos > d->m_diff3WrapLineVector[wrapLine].wrapLineLength)
1554 {
1555 wrapPos -= d->m_diff3WrapLineVector[wrapLine].wrapLineLength;
1556 ++wrapLine;
1557 }
1558 pos = wrapPos;
1559 line = wrapLine;
1560 }
1561 else
1562 {
1563 pos = d3LPos;
1564 line = d3LIdx;
1565 }
1566}
1567
1568void DiffTextWindow::convertLineCoordsToD3LCoords(LineRef line, qsizetype pos, LineType& d3LIdx, qsizetype& d3LPos) const
1569{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected