summaryrefslogtreecommitdiff
path: root/src/text.h
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2022-12-21 15:29:21 +0100
committerAlbert Cervin <albert@acervin.com>2022-12-21 15:29:21 +0100
commit690786504fce73edea78c7ec13b34771771e4caf (patch)
tree0a8927e6ab88bb5118eca569fdc4ae3593d7f178 /src/text.h
parenta817e01bfe2356fdd860010d46db4e4361f343a6 (diff)
downloaddged-690786504fce73edea78c7ec13b34771771e4caf.tar.gz
dged-690786504fce73edea78c7ec13b34771771e4caf.tar.xz
dged-690786504fce73edea78c7ec13b34771771e4caf.zip
wip render rework
Diffstat (limited to 'src/text.h')
-rw-r--r--src/text.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/text.h b/src/text.h
index 31fc9ca..213cf9e 100644
--- a/src/text.h
+++ b/src/text.h
@@ -5,7 +5,7 @@
// opaque so it is easier to change representation to gap, rope etc.
struct text;
-struct render_cmd;
+struct render_command;
struct text *text_create(uint32_t initial_capacity);
void text_destroy(struct text *text);
@@ -15,7 +15,7 @@ void text_destroy(struct text *text);
*/
void text_clear(struct text *text);
-void text_append_at(struct text *text, uint32_t line, uint32_t col,
+void text_insert_at(struct text *text, uint32_t line, uint32_t col,
uint8_t *bytes, uint32_t nbytes, uint32_t *lines_added,
uint32_t *cols_added);
@@ -28,6 +28,7 @@ void text_delete(struct text *text, uint32_t line, uint32_t col,
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);
struct text_chunk {
uint8_t *text;