Skip to content

Commit 4f4b9d2

Browse files
committed
Corrected code styling errors.
1 parent 52a41e0 commit 4f4b9d2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

demo/xtra/DIFF.LUA

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env lua
22

3-
local function diff_u(fn1,fn2)
3+
local function diff_u(fn1, fn2)
44
local function open(fn) local f, e = io.open(fn) if not f then print(e) os.exit(1) end return f end
55
local f1, f2, pre, add, del, p1, p2, x, y, h, l1, l2 = open(fn1), open(fn2), {}, {}, {}, 0, 0, 0, 0
66
local buf = {add = 0, del = 0, line = {}}
@@ -20,8 +20,8 @@ local function diff_u(fn1,fn2)
2020
j = 1
2121
repeat
2222
if del[i] == add[j] then
23-
table.insert(pol, table.remove(del, i)) table.remove(add, j)
24-
break
23+
table.insert(pol, table.remove(del, i)) table.remove(add, j)
24+
break
2525
end
2626
j = j + 1
2727
until j > #add
@@ -82,10 +82,9 @@ local function diff_u(fn1,fn2)
8282
if l1 == l2 then diagonal()
8383
elseif not l2 then right()
8484
elseif not l1 then down()
85-
else right() down()
86-
end
87-
85+
else right() down() end
8886
until not l1 and not l2
87+
8988
f1:close() f2:close()
9089
if #add > 0 or #del > 0 then flush_pre() flush_hunk() end
9190
if #buf.line > 0 then flush_buf() end

0 commit comments

Comments
 (0)