summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-05 14:51:11 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-05 14:51:11 +0200
commit9c72211f80425a8c3b1c34c7ec29bba708307c80 (patch)
treef2779c58d9246cdaa78870ba416e4a5c2cf18957
parent4bff1db8eac781fb909b56fa0b625d50c8f1c994 (diff)
Report emitted target action
-rw-r--r--tests/package_shell_test.lua3
-rw-r--r--yazi-enter.yazi/main.lua2
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/package_shell_test.lua b/tests/package_shell_test.lua
index 9330c71..0f783ef 100644
--- a/tests/package_shell_test.lua
+++ b/tests/package_shell_test.lua
@@ -29,6 +29,7 @@ end
local sync_calls = 0
local sync_callbacks = {}
local environment = {
+ cx = { active = { finder = nil, current = {} } },
error = error,
pairs = pairs,
type = type,
@@ -51,6 +52,6 @@ assert(type(plugin.entry) == "function", "plugin must export an entry method")
local intent = plugin:entry({ args = { "directory" } })
assert(intent.mode == "directory", "entry shell must load with the bundled runtime")
-assert(sync_callbacks[1]() == 0, "commit shell must load with the bundled runtime")
+assert(sync_callbacks[1](nil, "directory", "query") == 0, "commit must guard absent finder state")
print("package shell checks passed")
diff --git a/yazi-enter.yazi/main.lua b/yazi-enter.yazi/main.lua
index c6f5b74..5cdfa8a 100644
--- a/yazi-enter.yazi/main.lua
+++ b/yazi-enter.yazi/main.lua
@@ -147,7 +147,7 @@ local commit = ya.sync(function(_, mode, submitted_query)
elseif decision == ACTION_OPEN_HOVERED then
ya.emit("open", { hovered = true })
end
- return 0
+ return 1
end)
local function new_find_request(query, search_policy)