From ab5973aaca82c064dd54c30d2fd3db58e07947cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 28 Jul 2015 11:04:39 +0200 Subject: text-motion: introduce text_line_char_{get,set} --- text-motions.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'text-motions.h') 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); -- cgit v1.2.3