mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
scrolling region: wip
This commit is contained in:
parent
7cc9be01f4
commit
2fe7145aff
6 changed files with 199 additions and 77 deletions
5
vt.c
5
vt.c
|
|
@ -604,9 +604,8 @@ 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.scrolling_region.end - 1) {
|
||||
grid_scroll(&term->grid, 1);
|
||||
/* TODO: simulate \r? */
|
||||
} else
|
||||
grid_cursor_down(&term->grid, 1);
|
||||
break;
|
||||
|
|
@ -639,7 +638,7 @@ action(struct terminal *term, enum action action, uint8_t c)
|
|||
|
||||
case ACTION_PRINT: {
|
||||
if (term->grid.print_needs_wrap) {
|
||||
if (term->grid.cursor.row == term->grid.rows - 1) {
|
||||
if (term->grid.cursor.row == term->grid.scrolling_region.end - 1) {
|
||||
grid_scroll(&term->grid, 1);
|
||||
grid_cursor_to(&term->grid, term->grid.cursor.row, 0);
|
||||
} else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue