mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 17:58:18 +03:00
GTextEditor: Clear current selection, if any, on set_document()
This commit is contained in:
parent
5c2ef01f7b
commit
51262e7e2d
Notes:
sideshowbarker
2024-07-19 10:58:25 +09:00
Author: https://github.com/gootik Commit: https://github.com/SerenityOS/serenity/commit/51262e7e2d5 Pull-request: https://github.com/SerenityOS/serenity/pull/835
@ -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…
Reference in New Issue
Block a user