mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +00:00
LibGUI: Add TextEditor::force_rehighlight() method
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user