summaryrefslogtreecommitdiff
path: root/lua/clever_f
diff options
context:
space:
mode:
authorJackson Moore <jacksonmoore@tuta.io>2026-09-04 10:51:44 +0200
committerJackson Moore <jacksonmoore@tuta.io>2026-09-04 10:51:44 +0200
commitfa79c6d1c815fb87086b0cdd4eb48d55fe865134 (patch)
tree97524fb31b717321774630de367aa65dc195b7bd /lua/clever_f
parent9c02e7c3331416c22927ec1a78fc9a5724e10427 (diff)
Commit Visual success
Diffstat (limited to 'lua/clever_f')
-rw-r--r--lua/clever_f/motion_executor.lua10
1 files changed, 9 insertions, 1 deletions
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