diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-05 13:56:21 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-05 13:56:21 +0200 |
| commit | cca8738e6ffe1e7426a9345b263e8769128d00d2 (patch) | |
| tree | fef0e7eae97850efad8d6333fbdef42a079912c1 /yazi-enter.yazi | |
| parent | 60f62b6168269e895972acebf7ae20e3ba4ea821 (diff) | |
Derive search direction
Diffstat (limited to 'yazi-enter.yazi')
| -rw-r--r-- | yazi-enter.yazi/main.lua | 10 |
1 files changed, 10 insertions, 0 deletions
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) |