aboutsummaryrefslogtreecommitdiff
path: root/text.h
diff options
context:
space:
mode:
Diffstat (limited to 'text.h')
-rw-r--r--text.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/text.h b/text.h
index bedd16b..2cec7b1 100644
--- a/text.h
+++ b/text.h
@@ -33,8 +33,10 @@ bool text_insert(Text*, size_t pos, const char *data);
bool text_insert_raw(Text*, size_t pos, const char *data, size_t len);
bool text_delete(Text*, size_t pos, size_t len);
void text_snapshot(Text*);
-bool text_undo(Text*);
-bool text_redo(Text*);
+/* undo/redos to the last snapshoted state. returns the position where
+ * the change occured or (size_t)-1 if nothing could be undo/redo. */
+size_t text_undo(Text*);
+size_t text_redo(Text*);
size_t text_pos_by_lineno(Text*, size_t lineno);
size_t text_lineno_by_pos(Text*, size_t pos);