aboutsummaryrefslogtreecommitdiff
path: root/view.c
diff options
context:
space:
mode:
authorxomachine <xomachiner@gmail.com>2016-03-08 23:25:48 +0300
committerxomachine <xomachiner@gmail.com>2016-03-08 23:27:31 +0300
commit04fc1efbdb730d21207b1efe871fce95f58d18d6 (patch)
tree943569410c5c8e64a461f1f6947172ae1b1936cb /view.c
parent19de55089e69605186a61da633809d75db67b0d5 (diff)
downloadvis-04fc1efbdb730d21207b1efe871fce95f58d18d6.tar.gz
vis-04fc1efbdb730d21207b1efe871fce95f58d18d6.tar.xz
Workaround for #199
Diffstat (limited to 'view.c')
-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 */