LibGUI: Clear undo stack when opening a new document

This commit is contained in:
Carlos César Neves Enumo
2021-05-05 12:21:45 -03:00
committed by Andreas Kling
parent 88803b2e34
commit 67537bfc80
3 changed files with 9 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ TextDocument::~TextDocument()
bool TextDocument::set_text(const StringView& text)
{
m_client_notifications_enabled = false;
m_undo_stack.clear();
m_spans.clear();
remove_all_lines();