aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-03-08 23:22:05 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-03-08 23:22:05 +0100
commit5cec5b27e258bc8ef61db9adc14707c80a3c7d8f (patch)
tree4c9785673590afd0045b7c05fb2b54d407f8b70e
parent193be2f52cf15b86b9b54c9ce16b47b5731724ea (diff)
parent04fc1efbdb730d21207b1efe871fce95f58d18d6 (diff)
downloadvis-5cec5b27e258bc8ef61db9adc14707c80a3c7d8f.tar.gz
vis-5cec5b27e258bc8ef61db9adc14707c80a3c7d8f.tar.xz
Merge branch 'master' of https://github.com/xomachine/vis
-rw-r--r--view.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/view.c b/view.c
index 7f47f1a..877b705 100644
--- a/view.c
+++ b/view.c
@@ -520,8 +520,8 @@ void view_cursor_to(View *view, size_t pos) {
* stop once the screen is full, update view->end, view->lastline */
void view_draw(View *view) {
view_clear(view);
- /* read a screenful of text */
- const size_t text_size = view->width * view->height;
+ /* read a screenful of text considering each character as 4-byte UTF character*/
+ const size_t text_size = view->width * view->height * 4;
/* current buffer to work with */
char text[text_size+1];
/* remaining bytes to process in buffer */