Skip to content

Commit 6588b5a

Browse files
committed
Don't add trailing context if it doesn't exist in both files.
1 parent f329c12 commit 6588b5a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

xtra/DIFF.LUA

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ local function diff_u(fn1,fn2)
4646
j,u.n.l,u.e=j+1,u.n.l+1,0
4747
end
4848
if u then
49-
if u.e<4 and i<=h then
49+
if u.e<4 and i<=h and j<=w then
5050
table.insert(u.l,pfl(" ",get(fn1,f1,i)))
5151
u.e,u.o.l,u.n.l=u.e+1,u.o.l+1,u.n.l+1
5252
else

0 commit comments

Comments
 (0)