From 723f8685e241a94fb13e06f801d47900a9bf6a58 Mon Sep 17 00:00:00 2001 From: sdottaka Date: Wed, 27 Nov 2024 21:52:33 +0900 Subject: [PATCH] Fix issue #2543: The height of the lines connecting moving blocks in the location pane may be incorrect (2-1) --- Src/DiffWrapper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Src/DiffWrapper.cpp b/Src/DiffWrapper.cpp index f2a2a8540d4..91e46e2afd1 100644 --- a/Src/DiffWrapper.cpp +++ b/Src/DiffWrapper.cpp @@ -1535,7 +1535,7 @@ std::vector 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); } @@ -1543,7 +1543,7 @@ std::vector CDiffWrapper::InsertMovedBlocks3Way() 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);