stash undo3

This commit is contained in:
2025-11-29 12:36:11 -08:00
parent 85e9f33613
commit c47287e96e
8 changed files with 96 additions and 31 deletions

10
undo.h
View File

@@ -1,13 +1,15 @@
#include <stddef.h>
#include "abuf.h"
#include "editor.h"
#ifndef KE_UNDO_H
#define KE_UNDO_H
struct buffer;
typedef enum undo_kind {
UNDO_INSERT = 1 << 0,
UNDO_UNKNOWN = 1 << 1,
@@ -42,9 +44,9 @@ void undo_append(undo_tree *tree, abuf *buf);
void undo_prependch(undo_tree *tree, char c);
void undo_appendch(undo_tree *tree, char c);
void undo_commit(undo_tree *tree);
void undo_apply(struct editor *editor);
void editor_undo(undo_tree *tree);
void editor_redo(undo_tree *tree);
void undo_apply(struct buffer *buf);
void editor_undo(struct buffer *buf);
void editor_redo(struct buffer *buf);
#endif