diff options
Diffstat (limited to '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 |
