1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:18:12 +00:00

LibGUI+GMLPlayground: Reset cursor to end of text after replace

This commit is contained in:
SimonFJ20 2022-04-12 22:53:39 +02:00 committed by Andreas Kling
parent 661e7d691e
commit 50ca1b3d87

View file

@ -905,6 +905,7 @@ void ReplaceAllTextCommand::undo()
m_document.remove(m_range);
m_document.set_all_cursors(m_range.start());
auto new_cursor = m_document.insert_at(m_range.start(), m_text);
m_range.set_end(new_cursor);
m_document.set_all_cursors(new_cursor);
}