Files
bed/include/vase/buffer/append.h
T
syedm 8c61f186cf Major fixes:
- ChunkIterator is now bidirectional
- LineIterator is now also bidirectional
- Undo/redo history operations
- Replace operation
- Range based api functions
- And more minor bug fixes
2026-08-03 20:26:02 +01:00

24 lines
458 B
C++

#pragma once
#include "../constants.h"
#include "buffer.h"
#include "pch.h"
struct AppendBuffer : Buffer {
using TChunk = char[APPEND_CHUNK_SIZE];
std::vector<TChunk *> buf;
TChunk *t_current;
uint32_t current_offset{0};
uint32_t t_offset{0};
AppendBuffer();
~AppendBuffer();
uint32_t key(char c);
uint32_t append(const char *text, uint32_t length);
const char *read(uint32_t pos, uint32_t *out_len);
inline uint32_t length();
};