Add undo/redo infrastructure and buffer management additions.

This commit is contained in:
2025-11-29 22:48:31 -08:00
parent 40d33e1847
commit 1a72e2b312
16 changed files with 1000 additions and 73 deletions

20
UndoTree.h Normal file
View File

@@ -0,0 +1,20 @@
#ifndef KTE_UNDOTREE_H
#define KTE_UNDOTREE_H
#include "UndoNode.h"
class UndoTree {
UndoTree() : root{nullptr}, current{nullptr}, pending{nullptr} {}
void Begin(UndoKind kind, size_t row, size_t col);
void Commit();
private:
UndoNode *root{nullptr};
UndoNode *current{nullptr};
UndoNode *pending{nullptr};
};
#endif // KTE_UNDOTREE_H