From 14bc5a91de003f789e793498aca8fffab97edd0e Mon Sep 17 00:00:00 2001 From: sdottaka Date: Tue, 24 Dec 2024 21:52:30 +0900 Subject: [PATCH] WIP --- Src/DiffWrapper.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Src/DiffWrapper.cpp b/Src/DiffWrapper.cpp index 9f61654c5de..4ca3ea015b8 100644 --- a/Src/DiffWrapper.cpp +++ b/Src/DiffWrapper.cpp @@ -1335,8 +1335,10 @@ CDiffWrapper::LoadWinMergeDiffsFromDiffUtilsScript(struct change * script, const last1 = first1 + thisob->inserted - 1; translate_range (&file_data_ary[0], first0, last0, &trans_a0, &trans_b0); translate_range (&file_data_ary[1], first1, last1, &trans_a1, &trans_b1); - const int qtyLinesLeft = (trans_b0 - trans_a0) + 1; //Determine quantity of lines in this block for left side - const int qtyLinesRight = (trans_b1 - trans_a1) + 1;//Determine quantity of lines in this block for right side + const int qtyLinesLeft = (trans_b0 - trans_a0) + 1 + - ((!thisob->link && file_data_ary[0].missing_newline) ? 1 : 0); //Determine quantity of lines in this block for left side + const int qtyLinesRight = (trans_b1 - trans_a1) + 1 + - ((!thisob->link && file_data_ary[1].missing_newline) ? 1 : 0); //Determine quantity of lines in this block for right side if (op == OP_TRIVIAL && m_options.m_bCompletelyBlankOutIgnoredDiffereneces) { @@ -1360,8 +1362,10 @@ CDiffWrapper::LoadWinMergeDiffsFromDiffUtilsScript(struct change * script, const { if (thisob->trivial) op = OP_TRIVIAL; - const int qtyLinesLeft = (trans_b0 - trans_a0) + 1; //Determine quantity of lines in this block for left side - const int qtyLinesRight = (trans_b1 - trans_a1) + 1;//Determine quantity of lines in this block for right side + const int qtyLinesLeft = (trans_b0 - trans_a0) + 1 + - ((!thisob->link && file_data_ary[0].missing_newline) ? 1 : 0); //Determine quantity of lines in this block for left side + const int qtyLinesRight = (trans_b1 - trans_a1) + 1 + - ((!thisob->link && file_data_ary[1].missing_newline) ? 1 : 0); //Determine quantity of lines in this block for right side if (op == OP_TRIVIAL && m_options.m_bCompletelyBlankOutIgnoredDiffereneces) { if (qtyLinesLeft == qtyLinesRight)