MCPcopy Create free account
hub / github.com/WinMerge/winmerge / GetWordDiffArrayInDiffBlock

Method GetWordDiffArrayInDiffBlock

Src/MergeDocLineDiffs.cpp:315–331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315std::vector<WordDiff> CMergeDoc::GetWordDiffArrayInDiffBlock(int nDiff, bool ignoreDiffOptions/*=false*/)
316{
317 DIFFRANGE cd;
318 m_diffList.GetDiff(nDiff, cd);
319
320 bool diffPerLine = IsDiffPerLine(m_ptBuf[0]->GetTableEditing(), cd);
321 if (!diffPerLine)
322 return GetWordDiffArray(cd.dbegin, ignoreDiffOptions);
323
324 std::vector<WordDiff> worddiffs;
325 for (int nLine = cd.dbegin; nLine <= cd.dend; ++nLine)
326 {
327 std::vector<WordDiff> worddiffsPerLine = GetWordDiffArray(nLine, ignoreDiffOptions);
328 worddiffs.insert(worddiffs.end(), worddiffsPerLine.begin(), worddiffsPerLine.end());
329 }
330 return worddiffs;
331}
332
333std::vector<WordDiff>
334CMergeDoc::GetWordDiffArrayInRange(const int begin[3], const int end[3], bool ignoreDiffOptions/*=false*/, int pane1/*=-1*/, int pane2/*=-1*/)

Callers 3

GetFullySelectedDiffsMethod · 0.80
OnDisplayDiffMethod · 0.80
ShowDiffMethod · 0.80

Calls 5

IsDiffPerLineFunction · 0.85
GetDiffMethod · 0.80
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected