Files
bed/include/vase/vase.h
T
2026-07-28 02:57:13 +01:00

29 lines
525 B
C++

#pragma once
#include "buffer/append.h"
#include "buffer/original.h"
#include "pch.h"
#include "shard.h"
struct Vase {
OriginalBuffer original;
AppendBuffer append;
std::vector<ShardPtr> undo;
uint8_t top; // of the undo stack.
uint8_t max; // for redo when no edits have been done after some undo.
ShardPtr root;
Vase(char *data, uint32_t length)
: original(data, length),
append() {
root = new Petal(
length,
original.newlines.size(),
&original,
0
);
}
};