diff options
| author | Maxime Coste <mawww@kakoune.org> | 2024-04-11 11:37:18 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2024-04-12 15:28:40 +1000 |
| commit | 3d7d0fecca885b00a7ae80180ea1841fab2c5993 (patch) | |
| tree | 94218f4a6dab3f448ceaff034e51079a0ecc2e3c /src/face_registry.hh | |
| parent | b1c114bf6d950684df0524e450782a151e6a0323 (diff) | |
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
Diffstat (limited to 'src/face_registry.hh')
| -rw-r--r-- | src/face_registry.hh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/face_registry.hh b/src/face_registry.hh index e95a02fd..88e52980 100644 --- a/src/face_registry.hh +++ b/src/face_registry.hh @@ -24,6 +24,8 @@ class FaceRegistry : public SafeCountable public: FaceRegistry(FaceRegistry& parent) : SafeCountable{}, m_parent(&parent) {} + void reparent(FaceRegistry& parent) { m_parent = &parent; } + Face operator[](StringView facedesc) const; Face operator[](const FaceSpec& facespec) const; void add_face(StringView name, StringView facedesc, bool override = false); |
