From 9c02e7c3331416c22927ec1a78fc9a5724e10427 Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 10:51:22 +0200 Subject: Apply Visual motion endpoints --- lua/clever_f/motion_executor.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lua') 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 -- cgit v1.2.3