diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 10:48:22 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 10:48:22 +0200 |
| commit | ecddf5c243a63d08b8c595ace160128c279e03b6 (patch) | |
| tree | 929830bd25a22f5cfaef0eb1e44f1acf8f9bddae /lua/clever_f/motion_executor.lua | |
| parent | 3770a731f500e9253bbcf300c213276359a15686 (diff) | |
Apply reached command endpoints
Diffstat (limited to 'lua/clever_f/motion_executor.lua')
| -rw-r--r-- | lua/clever_f/motion_executor.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/clever_f/motion_executor.lua b/lua/clever_f/motion_executor.lua index 5dba08f..0c49ce1 100644 --- a/lua/clever_f/motion_executor.lua +++ b/lua/clever_f/motion_executor.lua @@ -54,8 +54,9 @@ end local function require_host(host) if type(host) ~= "table" or type(host.read_cursor) ~= "function" + or type(host.apply_cursor) ~= "function" then - fail("MotionExecutor host must provide read_cursor", 3) + fail("MotionExecutor host must provide cursor movement", 3) end return host end @@ -134,6 +135,9 @@ function MotionExecutor:_execute_command(request) local host = executor_records[self].host local origin = host:read_cursor() local outcome = calculate(self, request, origin) + if outcome.successful_steps > 0 then + host:apply_cursor(outcome.endpoint) + end return domain.ActionOutcome.from_search(outcome, request.plan.descriptor) end |
