From 3ed6bbd8eb7214268d6e042736dcd5285cb4f4d7 Mon Sep 17 00:00:00 2001 From: WormHeamer Date: Sun, 28 Dec 2025 19:46:16 -0500 Subject: add Txt pointer to TxtLoc --- txt.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'txt.h') diff --git a/txt.h b/txt.h index ccc71be..3af9970 100644 --- a/txt.h +++ b/txt.h @@ -18,16 +18,17 @@ typedef struct { u32 n, c; } TxtBuf; -typedef struct { - u32 p, i; -} TxtLoc; - typedef struct { DYNARR(TxtPiece) ptbl; TxtBuf buf[2]; u32 len; } Txt; +typedef struct { + Txt *t; + u32 p, i; +} TxtLoc; + u32 txt_split_piece(Txt *b, u32 pi, u32 i); void txt_remove_piece(Txt *b, u32 pi); void txt_insert_piece(Txt *b, u32 pi, TxtBufIdx buf, u32 ofs, u32 n); -- cgit v1.2.3