mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-08 12:12:53 +00:00
LibGUI: Expose a function to clear GTextEditor selection
This commit is contained in:
parent
9a01e70ff9
commit
5c2ef01f7b
Notes:
sideshowbarker
2024-07-19 10:58:31 +09:00
Author: https://github.com/gootik
Commit: 5c2ef01f7b
Pull-request: https://github.com/SerenityOS/serenity/pull/835
2 changed files with 9 additions and 0 deletions
|
@ -1223,6 +1223,14 @@ void GTextEditor::set_selection(const GTextRange& selection)
|
|||
update();
|
||||
}
|
||||
|
||||
void GTextEditor::clear_selection()
|
||||
{
|
||||
if (!has_selection())
|
||||
return;
|
||||
m_selection.clear();
|
||||
update();
|
||||
}
|
||||
|
||||
void GTextEditor::recompute_all_visual_lines()
|
||||
{
|
||||
int y_offset = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue