mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 22:02:12 +00:00
GTextEditor: Clear current selection, if any, on set_document()
This commit is contained in:
parent
5c2ef01f7b
commit
51262e7e2d
1 changed files with 2 additions and 0 deletions
|
@ -1409,6 +1409,8 @@ void GTextEditor::set_document(GTextDocument& document)
|
|||
m_line_visual_data.append(make<LineVisualData>());
|
||||
}
|
||||
m_cursor = { 0, 0 };
|
||||
if (has_selection())
|
||||
m_selection.clear();
|
||||
recompute_all_visual_lines();
|
||||
update();
|
||||
m_document->register_client(*this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue