summaryrefslogtreecommitdiff
path: root/gtk/gtktexthistory.c
Commit message (Collapse)AuthorAgeFilesLines
* text history: Update state when enabled changesMatthias Clasen2020-09-061-0/+2
| | | | | This makes can-undo go FALSE when we disable the text history, as it should.
* *: Fix spelling mistakes found by codespellBjörn Daase2020-08-211-1/+1
|
* texthistory: add GtkTextHistory helperChristian Hergert2019-11-051-0/+1062
The GtkTextHistory helper provides the fundamental undo/redo stack that can be integrated with other text widgets. It allows coalescing related actions to reduce both the number of undo actions to the user as well as the memory overhead. A new istring helper is used by GtkTextHistory to allow for "inline strings" that gracefully grow to using allocations with g_realloc(). This ensure that most undo operations require no additional allocations other than the struct for the action itself. A queue of undoable and redoable actions are maintained and the link for the queue is embedded in the undo action union. This allows again, for reducing the number of allocations involved for undo operations.