diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:06:10 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 12:06:10 +0200 |
| commit | 6f24b9436efd6fc6139ec0382109b586238b233a (patch) | |
| tree | 60bc24178db6579a8f04c748353b668abeefe81a | |
| parent | 7d08a49b62eed6c4afcd19897670fb10930faa46 (diff) | |
Return empty missing-input outcome
| -rw-r--r-- | lua/clever_f/acquisition_service.lua | 10 | ||||
| -rw-r--r-- | tests/run.lua | 4 |
2 files changed, 14 insertions, 0 deletions
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) |
