mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 00:48:11 +00:00
LibGUI: Don't recompute line-wrapping over and over during set_text()
This makes the TextEditor start up fast for large files again.
This commit is contained in:
parent
9a157b5e81
commit
fc14bdd442
4 changed files with 36 additions and 16 deletions
|
@ -36,6 +36,7 @@ public:
|
|||
virtual void document_did_remove_line(int) = 0;
|
||||
virtual void document_did_remove_all_lines() = 0;
|
||||
virtual void document_did_change() = 0;
|
||||
virtual void document_did_set_text() = 0;
|
||||
};
|
||||
|
||||
static NonnullRefPtr<GTextDocument> create(Client* client = nullptr)
|
||||
|
@ -90,6 +91,7 @@ private:
|
|||
Vector<GTextDocumentSpan> m_spans;
|
||||
|
||||
HashTable<Client*> m_clients;
|
||||
bool m_client_notifications_enabled { true };
|
||||
};
|
||||
|
||||
class GTextDocumentLine {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue