mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
LibGUI: Clear GUI::TextEditor selection before performing undo/redo
Fixes #6972.
This commit is contained in:
Notes:
sideshowbarker
2024-07-18 18:28:32 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/fbe6c275c93
@@ -1820,4 +1820,16 @@ void TextEditor::set_ruler_visible(bool visible)
|
||||
update();
|
||||
}
|
||||
|
||||
void TextEditor::undo()
|
||||
{
|
||||
clear_selection();
|
||||
document().undo();
|
||||
}
|
||||
|
||||
void TextEditor::redo()
|
||||
{
|
||||
clear_selection();
|
||||
document().redo();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user