From 41536aac59956cff26b6a2a0d5ed5331332bd7ac Mon Sep 17 00:00:00 2001 From: Diogo Duarte Date: Wed, 16 Apr 2025 10:54:10 +0100 Subject: [PATCH] Removed deprecated functions + minimal yazi version is now v25.4.8 --- README.md | 2 +- main.lua | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5af0c0a..e96b451 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ https://github.com/dedukun/bookmarks.yazi/assets/25795432/9a9fe345-dd06-442e-99f ## Requirements -- [Yazi](https://github.com/sxyazi/yazi) v25.2.7+ +- [Yazi](https://github.com/sxyazi/yazi) v25.4.8+ ## Features diff --git a/main.lua b/main.lua index 920bcb2..797d3a7 100644 --- a/main.lua +++ b/main.lua @@ -1,4 +1,4 @@ ---- @since 25.2.7 +--- @since 25.4.8 -- stylua: ignore local SUPPORTED_KEYS = { { on = "0"}, { on = "1"}, { on = "2"}, { on = "3"}, { on = "4"}, @@ -50,7 +50,7 @@ local _generate_description = ya.sync(function(state, file) end if state.desc_format == "parent" then - return tostring(file.url:parent()) + return tostring(file.url.parent) end -- full description return tostring(file.url) @@ -263,9 +263,9 @@ return { if action == "jump" then if bookmarks[selected].is_parent then - ya.manager_emit("cd", { bookmarks[selected].path }) + ya.mgr_emit("cd", { bookmarks[selected].path }) else - ya.manager_emit("reveal", { bookmarks[selected].path }) + ya.mgr_emit("reveal", { bookmarks[selected].path }) end elseif action == "delete" then delete_bookmark(selected)