From f90d5e1f07fdc9dea7c24b11107049b613a5be7a Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Sun, 29 Jan 2023 22:22:54 +0100 Subject: More tests and documentation Also improve find file and switch buffer a bit. Implement word backward/forward. --- src/text.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/text.h') diff --git a/src/text.h b/src/text.h index 213cf9e..85eb522 100644 --- a/src/text.h +++ b/src/text.h @@ -29,6 +29,8 @@ uint32_t text_num_lines(struct text *text); uint32_t text_line_length(struct text *text, uint32_t lineidx); uint32_t text_line_size(struct text *text, uint32_t lineidx); uint32_t text_col_to_byteindex(struct text *text, uint32_t line, uint32_t col); +uint32_t text_byteindex_to_col(struct text *text, uint32_t line, + uint32_t byteindex); struct text_chunk { uint8_t *text; -- cgit v1.2.3