From bd0a050c72ece85e071abe176962b256232082b8 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 10:20:24 +0200 Subject: Transform FIND destinations --- lua/clever_f/destination_engine.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lua/clever_f') 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() -- cgit v1.2.3