From 3d7d0fecca885b00a7ae80180ea1841fab2c5993 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 11 Apr 2024 11:37:18 +1000 Subject: Introduce "local" scope in evaluate-commands When using `eval` a new scope named 'local' gets pushed for the whole evaluation, this makes it possible to temporarily set an option/hook/alias... Local scopes nest so nested evals do work as expected. Remove the now trivial with-option command --- src/keymap_manager.hh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/keymap_manager.hh') diff --git a/src/keymap_manager.hh b/src/keymap_manager.hh index 208b44f1..4819be05 100644 --- a/src/keymap_manager.hh +++ b/src/keymap_manager.hh @@ -31,6 +31,8 @@ class KeymapManager public: KeymapManager(KeymapManager& parent) : m_parent(&parent) {} + void reparent(KeymapManager& parent) { m_parent = &parent; } + using KeyList = Vector; void map_key(Key key, KeymapMode mode, KeyList mapping, String docstring); void unmap_key(Key key, KeymapMode mode); -- cgit v1.2.3