mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:48:11 +00:00
GTextEditor: set_text() should clear any existing spans
This commit is contained in:
parent
cdac60e876
commit
b513a787fb
1 changed files with 2 additions and 0 deletions
|
@ -54,6 +54,8 @@ void GTextEditor::set_text(const StringView& text)
|
||||||
if (is_single_line() && text.length() == m_lines[0].length() && !memcmp(text.characters_without_null_termination(), m_lines[0].characters(), text.length()))
|
if (is_single_line() && text.length() == m_lines[0].length() && !memcmp(text.characters_without_null_termination(), m_lines[0].characters(), text.length()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
m_spans.clear();
|
||||||
|
|
||||||
m_selection.clear();
|
m_selection.clear();
|
||||||
m_lines.clear();
|
m_lines.clear();
|
||||||
int start_of_current_line = 0;
|
int start_of_current_line = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue