summaryrefslogtreecommitdiff
path: root/src/scope.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-04-07 15:36:39 +1000
committerMaxime Coste <mawww@kakoune.org>2018-04-07 16:27:50 +1000
commit57baad4afde8d1bab4040c5a5cbe8a5b367bceba (patch)
tree5e4f5fba17f8a6038301fcb129f36db102b0bd70 /src/scope.hh
parent6adb28ec1243adf13126ee47444d57dd2b842945 (diff)
Make FaceRegistry scoped
set-face now takes a scope argument, and faces can be overridden on a buffer or window basis. colorscheme apply on global scope, which should be good enough for now. Fixes #1411
Diffstat (limited to 'src/scope.hh')
-rw-r--r--src/scope.hh7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/scope.hh b/src/scope.hh
index c4b52586..b01799ed 100644
--- a/src/scope.hh
+++ b/src/scope.hh
@@ -2,10 +2,11 @@
#define scope_hh_INCLUDED
#include "alias_registry.hh"
+#include "face_registry.hh"
+#include "highlighter_group.hh"
#include "hook_manager.hh"
#include "keymap_manager.hh"
#include "option_manager.hh"
-#include "highlighter_group.hh"
#include "utils.hh"
namespace Kakoune
@@ -19,6 +20,7 @@ public:
m_hooks(parent.hooks()),
m_keymaps(parent.keymaps()),
m_aliases(parent.aliases()),
+ m_faces(parent.faces()),
m_highlighters(parent.highlighters()) {}
OptionManager& options() { return m_options; }
@@ -29,6 +31,8 @@ public:
const KeymapManager& keymaps() const { return m_keymaps; }
AliasRegistry& aliases() { return m_aliases; }
const AliasRegistry& aliases() const { return m_aliases; }
+ FaceRegistry& faces() { return m_faces; }
+ const FaceRegistry& faces() const { return m_faces; }
Highlighters& highlighters() { return m_highlighters; }
const Highlighters& highlighters() const { return m_highlighters; }
@@ -40,6 +44,7 @@ private:
HookManager m_hooks;
KeymapManager m_keymaps;
AliasRegistry m_aliases;
+ FaceRegistry m_faces;
Highlighters m_highlighters;
};