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

Method convertSelectionToD3LCoords

src/difftextwindow.cpp:1675–1695  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1673}
1674
1675void DiffTextWindow::convertSelectionToD3LCoords() const
1676{
1677 if(d->getDiff3LineVector() == nullptr || !updatesEnabled() || !isVisible() || d->m_selection.isEmpty())
1678 {
1679 return;
1680 }
1681
1682 // convert the d->m_selection to unwrapped coordinates: Later restore to new coords
1683 LineType firstD3LIdx;
1684 qsizetype firstD3LPos;
1685 qsizetype firstPosInText = d->m_selection.beginPos();
1686 convertLineCoordsToD3LCoords(d->m_selection.beginLine(), firstPosInText, firstD3LIdx, firstD3LPos);
1687
1688 LineType lastD3LIdx;
1689 qsizetype lastD3LPos;
1690 qsizetype lastPosInText = d->m_selection.endPos();
1691 convertLineCoordsToD3LCoords(d->m_selection.endLine(), lastPosInText, lastD3LIdx, lastD3LPos);
1692
1693 d->m_selection.start(firstD3LIdx, firstD3LPos);
1694 d->m_selection.end(lastD3LIdx, lastD3LPos);
1695}
1696
1697bool DiffTextWindow::startRunnables()
1698{

Callers 1

recalcWordWrapMethod · 0.80

Calls 8

beginPosMethod · 0.80
beginLineMethod · 0.80
endPosMethod · 0.80
endLineMethod · 0.80
startMethod · 0.80
endMethod · 0.80
getDiff3LineVectorMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected