From 6f24b9436efd6fc6139ec0382109b586238b233a Mon Sep 17 00:00:00 2001 From: Jackson Moore Date: Fri, 4 Sep 2026 12:06:10 +0200 Subject: Return empty missing-input outcome --- lua/clever_f/acquisition_service.lua | 10 ++++++++++ tests/run.lua | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/lua/clever_f/acquisition_service.lua b/lua/clever_f/acquisition_service.lua index 52b3949..ad4d051 100644 --- a/lua/clever_f/acquisition_service.lua +++ b/lua/clever_f/acquisition_service.lua @@ -653,6 +653,16 @@ function AcquisitionService:acquire(descriptor, context, position, count, macro_ target = nil scope:set_missing_previous_input(true) record.host:emit_diagnostic("error", M.PREVIOUS_INPUT_NOT_FOUND) + local outcome = scope:set_outcome( + domain.ActionOutcome.empty(request.position) + ) + scope:release() + return AcquisitionResult.new(request, { + outcome = outcome, + previous_input_trigger = trigger, + previous_target_source = scope.previous_target_source, + missing_previous_input = true, + }) end end scope:set_resolved_target(target) diff --git a/tests/run.lua b/tests/run.lua index 69f5087..55a4225 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -5275,6 +5275,10 @@ test("Missing previous input preserves cursor and emits exact diagnostic", funct local result = service:acquire("f", "n", origin, nil, nil) truthy(result.missing_previous_input) same(nil, result.target) + truthy(result:has_outcome()) + same(domain.ActionKind.EMPTY, result.outcome.kind) + same(origin, result.outcome.position) + falsy(service:last_temporary_scope().active) same(origin, host:read_cursor()) same(1, #host:diagnostics()) same("error", host:diagnostics()[1].level) -- cgit v1.2.3