aboutsummaryrefslogtreecommitdiff
path: root/vt.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-06-23 19:12:32 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-06-23 19:12:32 +0000
commit2fe7145aff1cf710fc00519a0f72199c3fa0a929 (patch)
tree02c6de8abe717252630ddb4b8c4f580380af6ba8 /vt.c
parentcsi: recognize, but do nothing, for civis, cvvis (diff)
scrolling region: wip
Diffstat (limited to 'vt.c')
-rw-r--r--vt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/vt.c b/vt.c
index df5f559a..710b706e 100644
--- a/vt.c
+++ b/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