Skip to content

Commit f80a520

Browse files
committed
Removed broken optimization in DIFF code.
1 parent fa243db commit f80a520

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

xtra/DIFF.LUA

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ local function diff_u(fn1,fn2)
99
if not h then print("--- "..SW(fn1).."\n+++ "..SW(fn2))h=true end
1010
if#p>0 then for _,v in ipairs(p)do table.insert(B.l," "..v)end B.o,B.n=x-#p,y-#p end p={}end
1111
local function FH()
12-
local pol={}
13-
local function opt()local i,j=1 repeat j=1 repeat if d[i]== a[j]then table.insert(pol,table.remove(d,i))table.remove(a,j)break end j=j+1 until j>#a i=i+1 until i>#d end
14-
if#d>0 and#a>0 then opt()end
1512
for _,v in ipairs(d)do table.insert(B.l,"-"..v)end
1613
for _,v in ipairs(a)do table.insert(B.l,"+"..v)end
17-
for _,v in ipairs(pol)do table.insert(B.l," "..v)end
1814
B.a,B.d=B.a+#a,B.d+#d d,a={},{}end
1915
local function FB()
2016
if#B.l>0 then B.d,B.a=#B.l-B.a,#B.l-B.d

0 commit comments

Comments
 (0)