summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/TextEditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibGUI/TextEditor.cpp')
-rw-r--r--Userland/Libraries/LibGUI/TextEditor.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp
index 0aeae17aa7..ca30ca3dee 100644
--- a/Userland/Libraries/LibGUI/TextEditor.cpp
+++ b/Userland/Libraries/LibGUI/TextEditor.cpp
@@ -1902,6 +1902,11 @@ void TextEditor::rehighlight_if_needed()
{
if (!m_needs_rehighlight)
return;
+ force_rehighlight();
+}
+
+void TextEditor::force_rehighlight()
+{
if (m_highlighter)
m_highlighter->rehighlight(palette());
m_needs_rehighlight = false;
@@ -1912,6 +1917,11 @@ Syntax::Highlighter const* TextEditor::syntax_highlighter() const
return m_highlighter.ptr();
}
+Syntax::Highlighter* TextEditor::syntax_highlighter()
+{
+ return m_highlighter.ptr();
+}
+
void TextEditor::set_syntax_highlighter(OwnPtr<Syntax::Highlighter> highlighter)
{
if (m_highlighter)