mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:27:44 +00:00
LibGUI: Remove now-unused undo coalescing timer from GUI::TextEditor
This is no longer used since commands handle merging themselves.
This commit is contained in:
parent
ce90d87eb6
commit
194a90884c
2 changed files with 0 additions and 16 deletions
|
@ -34,11 +34,6 @@ TextDocument::TextDocument(Client* client)
|
||||||
client->document_did_update_undo_stack();
|
client->document_did_update_undo_stack();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
m_undo_timer = Core::Timer::create_single_shot(
|
|
||||||
2000, [this] {
|
|
||||||
update_undo();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TextDocument::~TextDocument()
|
TextDocument::~TextDocument()
|
||||||
|
@ -316,9 +311,6 @@ void TextDocument::update_views(Badge<TextDocumentLine>)
|
||||||
|
|
||||||
void TextDocument::notify_did_change()
|
void TextDocument::notify_did_change()
|
||||||
{
|
{
|
||||||
if (m_undo_timer)
|
|
||||||
m_undo_timer->restart();
|
|
||||||
|
|
||||||
if (m_client_notifications_enabled) {
|
if (m_client_notifications_enabled) {
|
||||||
for (auto* client : m_clients)
|
for (auto* client : m_clients)
|
||||||
client->document_did_change();
|
client->document_did_change();
|
||||||
|
@ -846,11 +838,6 @@ void RemoveTextCommand::undo()
|
||||||
m_document.set_all_cursors(new_cursor);
|
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 TextDocument::insert_at(const TextPosition& position, const StringView& text, const Client* client)
|
||||||
{
|
{
|
||||||
TextPosition cursor = position;
|
TextPosition cursor = position;
|
||||||
|
|
|
@ -132,8 +132,6 @@ protected:
|
||||||
explicit TextDocument(Client* client);
|
explicit TextDocument(Client* client);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void update_undo();
|
|
||||||
|
|
||||||
NonnullOwnPtrVector<TextDocumentLine> m_lines;
|
NonnullOwnPtrVector<TextDocumentLine> m_lines;
|
||||||
Vector<TextDocumentSpan> m_spans;
|
Vector<TextDocumentSpan> m_spans;
|
||||||
|
|
||||||
|
@ -141,7 +139,6 @@ private:
|
||||||
bool m_client_notifications_enabled { true };
|
bool m_client_notifications_enabled { true };
|
||||||
|
|
||||||
UndoStack m_undo_stack;
|
UndoStack m_undo_stack;
|
||||||
RefPtr<Core::Timer> m_undo_timer;
|
|
||||||
|
|
||||||
RegexResult m_regex_result;
|
RegexResult m_regex_result;
|
||||||
size_t m_regex_result_match_index { 0 };
|
size_t m_regex_result_match_index { 0 };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue