1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:57:35 +00:00

LibGUI: Rename function to make intention clearer

This commit is contained in:
SimonFJ20 2022-04-13 16:14:59 +02:00 committed by Andreas Kling
parent 50ca1b3d87
commit 791e881892
3 changed files with 4 additions and 4 deletions

View file

@ -1446,14 +1446,14 @@ void TextEditor::insert_at_cursor_or_replace_selection(StringView text)
}
}
void TextEditor::replace_all_text_while_keeping_undo_stack(StringView text)
void TextEditor::replace_all_text_without_resetting_undo_stack(StringView text)
{
auto start = GUI::TextPosition(0, 0);
auto last_line_index = line_count() - 1;
auto end = GUI::TextPosition(last_line_index, line(last_line_index).length());
auto range = GUI::TextRange(start, end);
auto normalized_range = range.normalized();
execute<ReplaceAllTextCommand>(text, range);
execute<ReplaceAllTextCommand>(text, range, "GML Playground Format Text");
did_change();
set_cursor(normalized_range.start());
update();