diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 10:51:22 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 10:51:22 +0200 |
| commit | 9c02e7c3331416c22927ec1a78fc9a5724e10427 (patch) | |
| tree | 4cc5b9b323a2a85806b84a64da090b100b48cc53 /lua/clever_f/motion_executor.lua | |
| parent | 93e840d9f95c8500ccebcbfe6b09d5fa2a191040 (diff) | |
Apply Visual motion endpoints
Diffstat (limited to 'lua/clever_f/motion_executor.lua')
| -rw-r--r-- | lua/clever_f/motion_executor.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/clever_f/motion_executor.lua b/lua/clever_f/motion_executor.lua index afa3ee1..c22bed9 100644 --- a/lua/clever_f/motion_executor.lua +++ b/lua/clever_f/motion_executor.lua @@ -76,6 +76,7 @@ local function require_host(host) or type(host.read_cursor) ~= "function" or type(host.read_selection) ~= "function" or type(host.apply_cursor) ~= "function" + or type(host.apply_selection) ~= "function" then fail("MotionExecutor host must provide movement state", 3) end @@ -245,6 +246,9 @@ function MotionExecutor:_execute_visual(request) local origin = host:read_cursor() local outcome = calculate(self, request, origin) request.selection = selection + if outcome.successful_steps > 0 then + host:apply_selection(selection:with_focus(outcome.endpoint)) + end return domain.ActionOutcome.from_search(outcome, request.plan.descriptor) end |
