summaryrefslogtreecommitdiff
path: root/src/user/app/vterm/draw.c
blob: 50c56edd547c9c60f65d36ed76647f51ab0195ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "vterm.h"
#include <camellia/execbuf.h>
#include <camellia/syscalls.h>
#include <string.h>

struct framebuf fb;
struct rect dirty;

void scroll(void) {
	// TODO memmove. this is UD
	size_t row_len = fb.pitch * font.h;
	memcpy(fb.b, fb.b + row_len, fb.len - row_len);
	memset(fb.b + fb.len - row_len, 0, row_len);
	cursor.y--;

	dirty.x1 =  0; dirty.y1 =  0;
	dirty.x2 = ~0; dirty.y2 = ~0;
}