summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--txt.c5
1 files changed, 5 insertions, 0 deletions
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) {