diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 10:20:24 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 10:20:24 +0200 |
| commit | bd0a050c72ece85e071abe176962b256232082b8 (patch) | |
| tree | 51d8a720847ae990bd58a0415181fb467d6baaa9 /lua/clever_f/destination_engine.lua | |
| parent | 35b29e0a23efe5fe9660ac53154cbe85b409a754 (diff) | |
Transform FIND destinations
Diffstat (limited to 'lua/clever_f/destination_engine.lua')
| -rw-r--r-- | lua/clever_f/destination_engine.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lua/clever_f/destination_engine.lua b/lua/clever_f/destination_engine.lua index 2ff4c7a..e0ddcca 100644 --- a/lua/clever_f/destination_engine.lua +++ b/lua/clever_f/destination_engine.lua @@ -82,13 +82,25 @@ local function next_matching_start(request, origin) end end +local function regular_destination(request, target_position) + if request.plan.descriptor.family == domain.Family.FIND then + return target_position + end + return target_position +end + +local function target_destination(request, target_position) + return regular_destination(request, target_position) +end + function DestinationEngine:calculate(view, origin, plan, count, first_move) local request = calculation_inputs(view, origin, plan, count, first_move) local target_position = next_matching_start(request, request.origin) if target_position == nil then return domain.SearchOutcome.boundary_before_any(request.origin) end - return domain.SearchOutcome.complete(target_position, 1) + local destination = target_destination(request, target_position) + return domain.SearchOutcome.complete(destination, 1) end function M.new() |
