From 4e25019ba6bd1bd07925ccafc2936416ef3f7cbe Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 8 Jul 2019 13:57:31 +0200 Subject: wip: grid is now represented as a grid, not a linear array The grid is now represented with an array of row *pointers*. Each row contains an array of cells (the row's columns). The main point of having row pointers is we can now move rows around almost for free. This is useful when scrolling with scroll margins for example, where we previously had to copy the lines in the margins. Now it's just a matter of swapping two pointers. --- grid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'grid.c') diff --git a/grid.c b/grid.c index c08a002e..b36c5e0b 100644 --- a/grid.c +++ b/grid.c @@ -6,7 +6,7 @@ #define LOG_MODULE "grid" #define LOG_ENABLE_DBG 0 #include "log.h" - +#if 0 struct cell * grid_get_range(struct grid *grid, int start, int *length) { @@ -89,3 +89,4 @@ grid_memmove(struct grid *grid, int dst, int src, int length) copy_idx += count; } } +#endif -- cgit v1.3