diff options
Diffstat (limited to 'text-motions.c')
| -rw-r--r-- | text-motions.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/text-motions.c b/text-motions.c index ee8220e..210e1f4 100644 --- a/text-motions.c +++ b/text-motions.c @@ -39,6 +39,18 @@ size_t text_char_prev(Text *txt, size_t pos) { return it.pos; } +size_t text_codepoint_next(Text *txt, size_t pos) { + Iterator it = text_iterator_get(txt, pos); + text_iterator_codepoint_next(&it, NULL); + return it.pos; +} + +size_t text_codepoint_prev(Text *txt, size_t pos) { + Iterator it = text_iterator_get(txt, pos); + text_iterator_codepoint_prev(&it, NULL); + return it.pos; +} + static size_t find_next(Text *txt, size_t pos, const char *s, bool line) { if (!s) return pos; |
