diff options
| -rw-r--r-- | csi.c | 4 | ||||
| -rw-r--r-- | main.c | 1 | ||||
| -rw-r--r-- | vt.c | 2 |
3 files changed, 4 insertions, 3 deletions
@@ -585,7 +585,7 @@ csi_dispatch(struct terminal *term, uint8_t final) break; case 7: - LOG_WARN("unimplemented: smam (automatic margins)"); + term->auto_margin = true; break; case 12: @@ -655,7 +655,7 @@ csi_dispatch(struct terminal *term, uint8_t final) break; case 7: - LOG_WARN("unimplemented: smam (automatic margins)"); + term->auto_margin = false; break; case 12: @@ -864,6 +864,7 @@ main(int argc, char *const *argv) .ptmx = posix_openpt(O_RDWR | O_NOCTTY), .decckm = DECCKM_CSI, .keypad_mode = KEYPAD_NUMERICAL, /* TODO: verify */ + .auto_margin = true, .vt = { .state = 1, /* STATE_GROUND */ }, @@ -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); |
