Jedi code format: Fix issue comparing strings in TDiff.pas. JCF is not affected by this since we do not compare the changes in each character within the same line.

This commit is contained in:
DomingoGP 2025-06-29 10:01:50 +02:00
parent 4669f5dc48
commit 4409af1eb5

View File

@ -66,6 +66,9 @@
* 7 January 2021 - Removed Delphi support from version copied to JCF package * * 7 January 2021 - Removed Delphi support from version copied to JCF package *
* under Lazarus sources. Use TCardinalList from LazUtils. * * under Lazarus sources. Use TCardinalList from LazUtils. *
* by Juha Manninen. * * by Juha Manninen. *
* 29 Jun 2025 - Port change from https://github.com/rickard67/TextDiff *
* Fix bug comparing strings ( are 1 based). *
* by Domingo Galmés *
*******************************************************************************) *******************************************************************************)
interface interface
@ -293,7 +296,7 @@ begin
//finally, append any trailing matches onto compareList ... //finally, append any trailing matches onto compareList ...
with FLastCompareRec do with FLastCompareRec do
begin begin
AddChangeChr(oldIndex1,len1Minus1-oldIndex1, ckNone); AddChangeChr(oldIndex1,len1Minus1-oldIndex1+1, ckNone);
end; end;
finally finally
FExecuting := false; FExecuting := false;