GTextEditor: set_text() should clear any existing spans

This commit is contained in:
Andreas Kling 2019-10-26 20:21:12 +02:00
parent cdac60e876
commit b513a787fb
Notes: sideshowbarker 2024-07-19 11:32:05 +09:00

View file

@ -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()))
return;
m_spans.clear();
m_selection.clear();
m_lines.clear();
int start_of_current_line = 0;