Skip to content

Commit

Permalink
Fix issue #2543: The height of the lines connecting moving blocks in …
Browse files Browse the repository at this point in the history
…the location pane may be incorrect (2-1)
  • Loading branch information
sdottaka committed Nov 27, 2024
1 parent 8d3f79b commit 723f868
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/DiffWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1535,15 +1535,15 @@ std::vector<DiffRangeInfo> CDiffWrapper::InsertMovedBlocks3Way()
{
DiffRangeInfo diffInfoT = diffInfo2;
for (int pane = 0; pane < 3; ++pane)
diffInfoT.end[pane] = std::clamp(diffInfo.begin[pane] + i - 1, 0, diffInfo.end[pane]);
diffInfoT.end[pane] = std::clamp(diffInfo.begin[pane] + i - 1, -1, diffInfo.end[pane]);
result.push_back(diffInfoT);
}

DiffRangeInfo diffInfoM = diffInfo2;
for (int pane = 0; pane < 3; ++pane)
{
diffInfoM.begin[pane] = std::clamp(diffInfo.begin[pane] + i, 0, diffInfo.end[pane] + 1);
diffInfoM.end[pane] = std::clamp(diffInfo.begin[pane] + i, 0, diffInfo.end[pane]);
diffInfoM.end[pane] = std::clamp(diffInfo.begin[pane] + i, -1, diffInfo.end[pane]);
}
result.push_back(diffInfoM);

Expand Down

0 comments on commit 723f868

Please sign in to comment.