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

Method setFastSelectorRange

src/difftextwindow.cpp:624–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622}
623
624void DiffTextWindow::setFastSelectorRange(qint32 line1, qint32 nofLines)
625{
626 d->m_fastSelectorLine1 = line1;
627 d->m_fastSelectorNofLines = nofLines;
628 if(isVisible())
629 {
630 LineRef newFirstLine = getBestFirstLine(
631 convertDiff3LineIdxToLine(d->m_fastSelectorLine1),
632 convertDiff3LineIdxToLine(d->m_fastSelectorLine1 + d->m_fastSelectorNofLines) - convertDiff3LineIdxToLine(d->m_fastSelectorLine1),
633 d->m_firstLine,
634 getNofVisibleLines());
635 if(newFirstLine != d->m_firstLine)
636 {
637 scrollVertically(newFirstLine - d->m_firstLine);
638 }
639
640 update();
641 }
642}
643/*
644 Takes the line number estimated from mouse position and converts it to the actual line in
645 the file. Then sets the status message accordingly.

Callers

nothing calls this directly

Calls 1

getBestFirstLineFunction · 0.85

Tested by

no test coverage detected