Skip to content

Commit 3d92296

Browse files
author
Ian Macphail
committed
[[ Diff ]] Use "the number of elements in <array>" instead of the extents where appropriate
1 parent 11d1450 commit 3d92296

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

extensions/script-libraries/diff/diff.livecodescript

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function DiffCompare pFrom, pTo, pContext
7373
local tEdits
7474
put diff_strings(pFrom, pTo) into tEdits
7575
split pFrom by cr
76-
return convert_to_unified(tEdits, pFrom, item 2 of the extents of pFrom, pContext)
76+
return convert_to_unified(tEdits, pFrom, the number of elements in pFrom, pContext)
7777
end DiffCompare
7878

7979
/**
@@ -446,8 +446,8 @@ private function diff_strings pA, pB
446446
split pB by cr
447447

448448
local tALength, tBLength
449-
put item 2 of the extents of pA into tALength
450-
put item 2 of the extents of pB into tBLength
449+
put the number of elements in pA into tALength
450+
put the number of elements in pB into tBLength
451451

452452
local tSwap
453453
put tALength > tBLength into tSwap
@@ -471,7 +471,7 @@ end diff_strings
471471
private function patch_string pString, pEdits
472472
split pString by cr
473473
local tOutput
474-
put patch_arrays(pString, item 2 of the extents of pString, pEdits) into tOutput
474+
put patch_arrays(pString, the number of elements in pString, pEdits) into tOutput
475475

476476
return _combine(tOutput, cr)
477477

0 commit comments

Comments
 (0)