LibGUI: Use themes for syntax highlighting

This commit is contained in:
Oriko 2020-03-16 01:05:06 +02:00 committed by Andreas Kling
parent 6da7fd9aab
commit 2b162ef794
Notes: sideshowbarker 2024-07-19 08:17:09 +09:00
14 changed files with 219 additions and 85 deletions

View file

@ -1211,7 +1211,7 @@ void TextEditor::did_change()
if (on_change)
on_change();
if (m_highlighter)
m_highlighter->rehighlight();
m_highlighter->rehighlight(palette());
m_has_pending_change_notification = false;
});
}
@ -1491,7 +1491,7 @@ void TextEditor::flush_pending_change_notification_if_needed()
if (on_change)
on_change();
if (m_highlighter)
m_highlighter->rehighlight();
m_highlighter->rehighlight(palette());
m_has_pending_change_notification = false;
}
@ -1507,7 +1507,7 @@ void TextEditor::set_syntax_highlighter(OwnPtr<SyntaxHighlighter> highlighter)
m_highlighter = move(highlighter);
if (m_highlighter) {
m_highlighter->attach(*this);
m_highlighter->rehighlight();
m_highlighter->rehighlight(palette());
} else
document().set_spans({});
}