summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lua/clever_f/composition_root.lua2
-rw-r--r--tests/run.lua19
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