diff options
Diffstat (limited to 'text.h')
| -rw-r--r-- | text.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |
