summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-05-08 22:05:37 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-08 22:17:51 +0200
commit194a90884cf54fd17a9de8b42faef62bd6b9d567 (patch)
tree97fe7c215f3dace12129b17f5ff6929616168e3f /Userland/Libraries/LibGUI
parentce90d87eb60cbb86d07afb101d2226991924b865 (diff)
downloadserenity-194a90884cf54fd17a9de8b42faef62bd6b9d567.zip
LibGUI: Remove now-unused undo coalescing timer from GUI::TextEditor
This is no longer used since commands handle merging themselves.
Diffstat (limited to 'Userland/Libraries/LibGUI')
-rw-r--r--Userland/Libraries/LibGUI/TextDocument.cpp13
-rw-r--r--Userland/Libraries/LibGUI/TextDocument.h3
2 files changed, 0 insertions, 16 deletions
diff --git a/Userland/Libraries/LibGUI/TextDocument.cpp b/Userland/Libraries/LibGUI/TextDocument.cpp
index e5a91258f5..faa647dda8 100644
--- a/Userland/Libraries/LibGUI/TextDocument.cpp
+++ b/Userland/Libraries/LibGUI/TextDocument.cpp
@@ -34,11 +34,6 @@ TextDocument::TextDocument(Client* client)
client->document_did_update_undo_stack();
}
};
-
- m_undo_timer = Core::Timer::create_single_shot(
- 2000, [this] {
- update_undo();
- });
}
TextDocument::~TextDocument()
@@ -316,9 +311,6 @@ void TextDocument::update_views(Badge<TextDocumentLine>)
void TextDocument::notify_did_change()
{
- if (m_undo_timer)
- m_undo_timer->restart();
-
if (m_client_notifications_enabled) {
for (auto* client : m_clients)
client->document_did_change();
@@ -846,11 +838,6 @@ void RemoveTextCommand::undo()
m_document.set_all_cursors(new_cursor);
}
-void TextDocument::update_undo()
-{
- // FIXME: Maybe seal the last command somehow?
-}
-
TextPosition TextDocument::insert_at(const TextPosition& position, const StringView& text, const Client* client)
{
TextPosition cursor = position;
diff --git a/Userland/Libraries/LibGUI/TextDocument.h b/Userland/Libraries/LibGUI/TextDocument.h
index 8f97466d66..503e80580e 100644
--- a/Userland/Libraries/LibGUI/TextDocument.h
+++ b/Userland/Libraries/LibGUI/TextDocument.h
@@ -132,8 +132,6 @@ protected:
explicit TextDocument(Client* client);
private:
- void update_undo();
-
NonnullOwnPtrVector<TextDocumentLine> m_lines;
Vector<TextDocumentSpan> m_spans;
@@ -141,7 +139,6 @@ private:
bool m_client_notifications_enabled { true };
UndoStack m_undo_stack;
- RefPtr<Core::Timer> m_undo_timer;
RegexResult m_regex_result;
size_t m_regex_result_match_index { 0 };