Skip to content

Commit 1bcc17a

Browse files
guidocellakasper93
authored andcommitted
select.lua: fix selecting the default subtitle line
Fixes 53796ca.
1 parent dde8d8c commit 1bcc17a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

player/lua/select.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,10 @@ local function select_subtitle_line(secondary, keep_open)
345345
local delay = mp.get_property_native(secondary .. "sub-delay")
346346
local time_pos = mp.get_property_native("time-pos") - delay
347347
local duration = mp.get_property_native("duration", math.huge)
348+
local nested_call = default_item ~= nil
348349

349350
for _, line in ipairs(lines) do
350-
if not default_item and line.start <= time_pos then
351+
if not nested_call and line.start <= time_pos then
351352
default_item = #items + 1
352353
end
353354

0 commit comments

Comments
 (0)