commit da07e811f6362cbba6c4f843d777d28f4c9d7052
parent 8f93b0969ad7ec232543cddd0d9830072bc66836
Author: Byron Torres <b@torresjrjr.com>
Date: Wed, 17 Jan 2024 22:01:16 +0000
comments
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/history.ha b/history.ha
@@ -1,15 +1,19 @@
+// History of buffer changes; a chronological list of change sequences.
type History = []ChangeSeq;
+// A record of a sequence of buffer changes; the effect of one command.
type ChangeSeq = []Change;
+// A record of a single arbitrary buffer change.
type Change = (Addition | Deletion);
-// chunk (position, size)
+// The addition of a buffer chunk (start position, chunk size).
type Addition = (size, size);
-// chunk (position, size)
+// The deletion of a buffer chunk (start position, chunk size).
type Deletion = (size, size);
+// There is no history to undo.
type NoHistory = !void;
fn hist_newseq(buf: *Buffer) void = {