grid: implement DAMAGE_SCROLL

This commit is contained in:
Daniel Eklöf 2019-06-21 14:29:15 +02:00
parent 0ddd96de0d
commit a50be28b9d
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
5 changed files with 142 additions and 15 deletions

5
vt.c
View file

@ -158,9 +158,10 @@ action(struct terminal *term, enum action action, uint8_t c)
LOG_DBG("execute: 0x%02x", c);
switch (c) {
case '\n':
if (term->grid.cursor.row == term->grid.rows - 1)
if (term->grid.cursor.row == term->grid.rows - 1) {
grid_scroll(&term->grid, 1);
else
/* TODO: simulate \r? */
} else
grid_cursor_down(&term->grid, 1);
break;