summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/TextEditor.cpp
diff options
context:
space:
mode:
authorthankyouverycool <66646555+thankyouverycool@users.noreply.github.com>2022-02-22 15:00:56 -0500
committerAndreas Kling <kling@serenityos.org>2022-02-24 19:09:41 +0100
commit94b74937d8f6a8680386388b8c34e0167fc06ebd (patch)
tree231355c43c4f92e1f5bfa635d58c055fc21f5379 /Userland/Libraries/LibGUI/TextEditor.cpp
parent3aa95dd4d5be91898d912a39c97a432b05c6f401 (diff)
downloadserenity-94b74937d8f6a8680386388b8c34e0167fc06ebd.zip
LibGUI+LibSyntax: Stringify Highlighter::Language
This patch adds a Highlighter::Language -> string helper and a callback for Highlighter changes.
Diffstat (limited to 'Userland/Libraries/LibGUI/TextEditor.cpp')
-rw-r--r--Userland/Libraries/LibGUI/TextEditor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/TextEditor.cpp b/Userland/Libraries/LibGUI/TextEditor.cpp
index b1ad773e62..4e23c8cc9f 100644
--- a/Userland/Libraries/LibGUI/TextEditor.cpp
+++ b/Userland/Libraries/LibGUI/TextEditor.cpp
@@ -1934,6 +1934,8 @@ void TextEditor::set_syntax_highlighter(OwnPtr<Syntax::Highlighter> highlighter)
m_needs_rehighlight = true;
} else
document().set_spans({});
+ if (on_highlighter_change)
+ on_highlighter_change();
}
AutocompleteProvider const* TextEditor::autocomplete_provider() const