diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2015-07-28 11:04:39 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2015-07-28 13:21:50 +0200 |
| commit | ab5973aaca82c064dd54c30d2fd3db58e07947cc (patch) | |
| tree | c619b21ddae8aa0a8ef85ac4df43c9b2d8d2851c /text-motions.h | |
| parent | 1dfef906f43eb1d950d71cb6e44d6b83e2d158f3 (diff) | |
| download | vis-ab5973aaca82c064dd54c30d2fd3db58e07947cc.tar.gz vis-ab5973aaca82c064dd54c30d2fd3db58e07947cc.tar.xz | |
text-motion: introduce text_line_char_{get,set}
Diffstat (limited to 'text-motions.h')
| -rw-r--r-- | text-motions.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/text-motions.h b/text-motions.h index 72878cd..c89c256 100644 --- a/text-motions.h +++ b/text-motions.h @@ -36,6 +36,10 @@ size_t text_line_lastchar(Text*, size_t pos); size_t text_line_end(Text*, size_t pos); size_t text_line_next(Text*, size_t pos); size_t text_line_offset(Text*, size_t pos, size_t off); +/* get character count of the line upto `pos' */ +int text_line_char_get(Text*, size_t pos); +/* get position of the `count' character in the line containing `pos' */ +size_t text_line_char_set(Text*, size_t pos, int count); /* move to the next/previous character on the same line */ size_t text_line_char_next(Text*, size_t pos); size_t text_line_char_prev(Text*, size_t pos); |
