mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 11:48:32 +00:00
GTextEditor: Clear current selection, if any, on set_document()
This commit is contained in:
committed by
Andreas Kling
parent
5c2ef01f7b
commit
51262e7e2d
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user