From cca8738e6ffe1e7426a9345b263e8769128d00d2 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Sat, 5 Sep 2026 13:56:21 +0200 Subject: Derive search direction --- yazi-enter.yazi/main.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'yazi-enter.yazi/main.lua') diff --git a/yazi-enter.yazi/main.lua b/yazi-enter.yazi/main.lua index ccee0d7..16a5d66 100644 --- a/yazi-enter.yazi/main.lua +++ b/yazi-enter.yazi/main.lua @@ -1,5 +1,8 @@ --- @since 26.9.1 +local DIRECTION_FORWARD = "forward" +local DIRECTION_BACKWARD = "backward" + local ACCEPTED_OPTIONS = { previous = true, smart = true, @@ -44,6 +47,13 @@ local function validate_argument_keys(args) end end +local function derive_direction(previous) + if previous then + return DIRECTION_BACKWARD + end + return DIRECTION_FORWARD +end + local commit = ya.sync(function() return 0 end) -- cgit v1.2.3