From 0a9d0673049228a7527b39ab12d0a314198ceeef Mon Sep 17 00:00:00 2001 From: WormHeamer Date: Mon, 29 Dec 2025 20:43:45 -0500 Subject: documentation comment for txt_split_piece() --- txt.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'txt.c') diff --git a/txt.c b/txt.c index d5ee28d..818e4c2 100644 --- a/txt.c +++ b/txt.c @@ -33,6 +33,11 @@ void txt_remove_piece(Txt *b, u32 pi) { b->ptbl.n--; } +/* ensures that the returned TxtLoc is at the end of its respective piece, + * one past the final character. note that this is an invalid position for + * normal navigation, so it must be moved back into place with resolve_loc() + * or txt_post_edit(). + */ TxtLoc txt_split_piece(TxtLoc l) { TxtPiece *p = &l.t->ptbl.v[l.p]; if (l.i < p->n) { -- cgit v1.2.3