diff options
| author | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 14:20:18 +0200 |
|---|---|---|
| committer | Jackson Moore <jacksonmoore@tuta.io> | 2026-09-04 14:20:18 +0200 |
| commit | 59d83f8ecf982c7b1d3cd5455fd066a880cdb622 (patch) | |
| tree | 9e826eabdd3ccc60923ff77a9d08bdc9d1c4f2b8 | |
| parent | 21bd412fe56905702f30097ce37bf3e9f73ec3d0 (diff) | |
Check mapping suppression sentinel
| -rw-r--r-- | lua/clever_f/composition_root.lua | 2 | ||||
| -rw-r--r-- | tests/run.lua | 19 |
2 files changed, 21 insertions, 0 deletions
diff --git a/lua/clever_f/composition_root.lua b/lua/clever_f/composition_root.lua index fa38fa1..051520c 100644 --- a/lua/clever_f/composition_root.lua +++ b/lua/clever_f/composition_root.lua @@ -127,6 +127,7 @@ end function CompositionRoot:activate() local record = root_records[self] if record.activation == nil then + local setup = record.policy:capture_activation() local feedback_activation = record.feedback:activate() local highlights = record.feedback:evaluate_highlights() local colorscheme_registration = record.host:register_events( @@ -138,6 +139,7 @@ function CompositionRoot:activate() ) record.activation = { state = record.state, + setup = setup, feedback = feedback_activation, highlights = highlights, colorscheme_registration = colorscheme_registration, diff --git a/tests/run.lua b/tests/run.lua index 66816bb..4e1649a 100644 --- a/tests/run.lua +++ b/tests/run.lua @@ -7187,6 +7187,25 @@ test("Core activation exposes all seven logical actions", function() same(domain.ActionKind.NEUTRAL, host:invoke_action("Reset").kind) end) +test("Core activation checks mapping suppression by sentinel presence", function() + fresh_sequence_state() + local absent = composition_root.new({ host = MemoryHost.new() }):activate() + truthy(absent.setup.install_default_mappings) + + for _, value in ipairs({ false, 0 }) do + fresh_sequence_state() + local configuration = {} + configuration[policy.DEFAULT_MAP_SUPPRESSION_SENTINEL] = value + local host = MemoryHost.new({ configuration = configuration }) + local root = composition_root.new({ host = host }) + local activation = root:activate() + falsy(activation.setup.install_default_mappings) + + host:unset_configuration(policy.DEFAULT_MAP_SUPPRESSION_SENTINEL) + falsy(root:activate().setup.install_default_mappings) + end +end) + test("Primary coordination accepts only the four motion descriptors", function() local coordinator = sequence_coordinator.new({ host = MemoryHost.new() }) for _, value in ipairs({ "f", "F", "t", "T" }) do |
