mirror of https://github.com/odrling/Aegisub
Select the right things in the select overlaps macro. Closes #1594.
This commit is contained in:
parent
f7f948872b
commit
d85419c49a
|
@ -27,11 +27,13 @@ function select_overlaps(subs)
|
||||||
for i = 1,#subs do
|
for i = 1,#subs do
|
||||||
local line = subs[i]
|
local line = subs[i]
|
||||||
if line.class == "dialogue" then
|
if line.class == "dialogue" then
|
||||||
line.i = i - 1
|
line.i = i
|
||||||
table.insert(dialogue, line)
|
table.insert(dialogue, line)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
table.sort(dialogue, function(a,b) return a.start_time < b.start_time end)
|
table.sort(dialogue, function(a,b)
|
||||||
|
return a.start_time < b.start_time or (a.start_time == b.start_time and a.i < b.i)
|
||||||
|
end)
|
||||||
|
|
||||||
local end_time = 0
|
local end_time = 0
|
||||||
local overlaps = {}
|
local overlaps = {}
|
||||||
|
|
Loading…
Reference in New Issue