Add support in the entry function for Yazi stable release

This commit is contained in:
Diogo Duarte
2024-12-03 21:43:32 +00:00
parent e755ebc1e6
commit 20ece7e1ef

View File

@@ -194,8 +194,11 @@ local delete_all_bookmarks = ya.sync(function(state)
end)
return {
entry = function(_, job)
local action = job.args[1]
entry = function(_, job_or_args)
-- TODO: DEPRECATE IN Yazi 0.4
-- https://github.com/sxyazi/yazi/pull/1966
local args = job_or_args.args or job_or_args
local action = args[1]
if not action then
return
end
@@ -233,7 +236,7 @@ return {
return
end
-- TODO: DEPRECATED
-- TODO: DEPRECATED Yazi 0.4
if args.save_last_directory then
_save_last_directory()
elseif type(args.last_directory) == "table" then