vt: implement (untested!) smam and rmam (auto margins)

Default is auto-margins enabled (scroll when cursor reaches right
margin).
This commit is contained in:
Daniel Eklöf 2019-07-03 21:18:06 +02:00
parent 90dadfcc22
commit 3c67628c57
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 4 additions and 3 deletions

2
vt.c
View file

@ -690,7 +690,7 @@ action(struct terminal *term, enum action action, uint8_t c)
break;
case ACTION_PRINT: {
if (term->print_needs_wrap) {
if (term->auto_margin && term->print_needs_wrap) {
if (term->cursor.row == term->scroll_region.end - 1) {
term_scroll(term, 1);
term_cursor_to(term, term->cursor.row, 0);