stats: fix single invocation keybindings

This commit is contained in:
sfan5 2020-07-21 19:32:52 +02:00
parent f89c7404d1
commit b67c7a23b8
1 changed files with 5 additions and 2 deletions

View File

@ -964,8 +964,11 @@ mp.add_key_binding(o.key_toggle, "display-stats-toggle", function() process_key_
-- Single invocation bindings without key, can be used in input.conf to create
-- bindings for a specific page: "e script-binding stats/display-page-2"
for k, _ in pairs(pages) do
mp.add_key_binding(nil, "display-page-" .. k, function() process_key_binding(true) end,
{repeatable=true})
mp.add_key_binding(nil, "display-page-" .. k,
function()
curr_page = k
process_key_binding(true)
end, {repeatable=true})
end
-- Reprint stats immediately when VO was reconfigured, only when toggled