mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 17:58:49 +00:00
GTextEditor: set_text() should clear any existing spans
This commit is contained in:
parent
cdac60e876
commit
b513a787fb
Notes:
sideshowbarker
2024-07-19 11:32:05 +09:00
Author: https://github.com/awesomekling
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()))
|
||||
return;
|
||||
|
||||
m_spans.clear();
|
||||
|
||||
m_selection.clear();
|
||||
m_lines.clear();
|
||||
int start_of_current_line = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue