undelete all and globalize timer

if timer is local showList() can't reference it
This commit is contained in:
bitingsock 2021-03-06 15:54:23 -08:00 committed by GitHub
parent d9fd475f6f
commit 9ef1adfa81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -52,7 +52,7 @@ function showList()
showListTimer:kill()
end
end
local showListTimer = mp.add_periodic_timer(1,showList)
showListTimer = mp.add_periodic_timer(1,showList)
showListTimer:kill()
function list_marks()
if showListTimer:is_enabled() then
@ -71,4 +71,5 @@ end
mp.add_key_binding("ctrl+DEL", "delete_file", mark_delete)
mp.add_key_binding("alt+DEL", "list_marks", list_marks)
mp.add_key_binding("ctrl+shift+DEL", "clear_list", function() mp.osd_message("Undelete all"); del_list = {}; end)
mp.register_event("shutdown", delete)