From a73225c9b45e110d315a3fc587a82040ce8c9a13 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Tue, 13 Dec 2022 09:01:00 +0100 Subject: Implement scrolling Buffer now scrolls correcly when reaching top or bottom and puts dot at the middle of the screen. --- src/text.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/text.h') diff --git a/src/text.h b/src/text.h index a057a47..708ef09 100644 --- a/src/text.h +++ b/src/text.h @@ -16,9 +16,6 @@ void text_append(struct text *text, uint32_t line, uint32_t col, uint8_t *bytes, void text_delete(struct text *text, uint32_t line, uint32_t col, uint32_t nchars); -uint32_t text_render(struct text *text, uint32_t line, uint32_t nlines, - struct render_cmd *cmds, uint32_t max_ncmds); - 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); @@ -27,6 +24,7 @@ struct text_chunk { uint8_t *text; uint32_t nbytes; uint32_t nchars; + uint32_t line; }; typedef void (*chunk_cb)(struct text_chunk *chunk, void *userdata); -- cgit v1.2.3