summaryrefslogtreecommitdiff
path: root/src/window.cc
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-05-08 11:29:23 +0100
committerMaxime Coste <mawww@kakoune.org>2017-05-08 11:29:23 +0100
commitb0b40485ce794c828d376cb2081581312ddd2a67 (patch)
tree341c11d8c1ac49973699a57643d301f1d291e8b5 /src/window.cc
parenta5d4dbc16e84258a16767bbf47e14e8db28f8649 (diff)
Move SimpleHighlighter as an implementation detail
Diffstat (limited to 'src/window.cc')
-rw-r--r--src/window.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/window.cc b/src/window.cc
index 234c3e96..262c6979 100644
--- a/src/window.cc
+++ b/src/window.cc
@@ -17,9 +17,7 @@ namespace Kakoune
{
// Implementation in highlighters.cc
-void highlight_selections(const Context& context, HighlightPass pass, DisplayBuffer& display_buffer, BufferRange range);
-void expand_tabulations(const Context& context, HighlightPass pass, DisplayBuffer& display_buffer, BufferRange range);
-void expand_unprintable(const Context& context, HighlightPass pass, DisplayBuffer& display_buffer, BufferRange range);
+void setup_builtin_highlighters(HighlighterGroup& group);
Window::Window(Buffer& buffer)
: Scope(buffer),
@@ -31,9 +29,7 @@ Window::Window(Buffer& buffer)
options().register_watcher(*this);
- m_builtin_highlighters.add_child({"tabulations"_str, make_simple_highlighter(expand_tabulations)});
- m_builtin_highlighters.add_child({"unprintable"_str, make_simple_highlighter(expand_unprintable)});
- m_builtin_highlighters.add_child({"selections"_str, make_simple_highlighter(highlight_selections)});
+ setup_builtin_highlighters(m_builtin_highlighters);
for (auto& option : options().flatten_options())
on_option_changed(*option);