From fa79c6d1c815fb87086b0cdd4eb48d55fe865134 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 10:51:44 +0200 Subject: Commit Visual success --- lua/clever_f/motion_executor.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lua/clever_f') diff --git a/lua/clever_f/motion_executor.lua b/lua/clever_f/motion_executor.lua index c22bed9..f7722e8 100644 --- a/lua/clever_f/motion_executor.lua +++ b/lua/clever_f/motion_executor.lua @@ -112,8 +112,9 @@ local function require_transitions(transitions, state) transitions = transitions or state_transitions.new(state) if type(transitions) ~= "table" or type(transitions.CommitCommandSuccess) ~= "function" + or type(transitions.CommitVisualSuccess) ~= "function" then - fail("MotionExecutor transitions must commit command success", 3) + fail("MotionExecutor transitions must commit motion success", 3) end return transitions end @@ -249,6 +250,13 @@ function MotionExecutor:_execute_visual(request) if outcome.successful_steps > 0 then host:apply_selection(selection:with_focus(outcome.endpoint)) end + if not outcome.complete then + return domain.ActionOutcome.from_search(outcome, request.plan.descriptor) + end + executor_records[self].transitions:CommitVisualSuccess( + request.context, + outcome.endpoint + ) return domain.ActionOutcome.from_search(outcome, request.plan.descriptor) end -- cgit v1.2.3