mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-24 07:53:41 +03:00
Window: segregate builtins highlighters from the others
This commit is contained in:
parent
6318f2268f
commit
6b812d9f6c
@ -22,9 +22,9 @@ Window::Window(Buffer& buffer)
|
||||
m_hooks.run_hook("WinCreate", buffer.name(), hook_context);
|
||||
m_options.register_watcher(*this);
|
||||
|
||||
m_highlighters.append(registry["expand_tabs"](*this, {}));
|
||||
m_highlighters.append(registry["expand_unprintable"](*this, {}));
|
||||
m_highlighters.append(registry["highlight_selections"](*this, {}));
|
||||
m_builtin_highlighters.append(registry["expand_tabs"](*this, {}));
|
||||
m_builtin_highlighters.append(registry["expand_unprintable"](*this, {}));
|
||||
m_builtin_highlighters.append(registry["highlight_selections"](*this, {}));
|
||||
|
||||
for (auto& option : m_options.flatten_options())
|
||||
on_option_changed(option.first, option.second);
|
||||
@ -65,6 +65,7 @@ void Window::update_display_buffer()
|
||||
|
||||
m_display_buffer.compute_range();
|
||||
m_highlighters(m_display_buffer);
|
||||
m_builtin_highlighters(m_display_buffer);
|
||||
m_display_buffer.optimize();
|
||||
|
||||
m_timestamp = buffer().timestamp();
|
||||
@ -108,6 +109,7 @@ void Window::scroll_to_keep_cursor_visible_ifn()
|
||||
|
||||
display_buffer.compute_range();
|
||||
m_highlighters(display_buffer);
|
||||
m_builtin_highlighters(display_buffer);
|
||||
|
||||
// now we can compute where the cursor is in display columns
|
||||
// (this is only valid if highlighting one line and multiple lines put
|
||||
|
@ -60,6 +60,7 @@ private:
|
||||
DisplayBuffer m_display_buffer;
|
||||
|
||||
HighlighterGroup m_highlighters;
|
||||
HighlighterGroup m_builtin_highlighters;
|
||||
|
||||
HookManager m_hooks;
|
||||
OptionManager m_options;
|
||||
|
Loading…
Reference in New Issue
Block a user