wip: use a sliding window instead of memmove() to scroll

Instead of memmoving a large amount of data on every scroll, use a
sliding window. That is, each time we scroll, we offset origin.
This commit is contained in:
Daniel Eklöf 2019-07-01 12:23:38 +02:00
parent 9e3b8ab3ff
commit d70956da08
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
7 changed files with 140 additions and 108 deletions

4
grid.h
View file

@ -1,3 +1,7 @@
#pragma once
#include <stddef.h>
#include "terminal.h"
struct cell *grid_get_range(struct grid *grid, size_t start, size_t *length);
void grid_memset(struct grid *grid, size_t start, int c, size_t length);