summaryrefslogtreecommitdiff
path: root/src/text.h
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2022-12-13 09:01:00 +0100
committerAlbert Cervin <albert@acervin.com>2022-12-13 09:01:00 +0100
commita73225c9b45e110d315a3fc587a82040ce8c9a13 (patch)
treef6b00156d203181ecbfd2f02cf7b1589dfd88e91 /src/text.h
parent31e6fb2ba5fe9fd04722971a13a72ec71e846e46 (diff)
downloaddged-a73225c9b45e110d315a3fc587a82040ce8c9a13.tar.gz
dged-a73225c9b45e110d315a3fc587a82040ce8c9a13.tar.xz
dged-a73225c9b45e110d315a3fc587a82040ce8c9a13.zip
Implement scrolling
Buffer now scrolls correcly when reaching top or bottom and puts dot at the middle of the screen.
Diffstat (limited to 'src/text.h')
-rw-r--r--src/text.h4
1 files changed, 1 insertions, 3 deletions
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);