diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-06-23 16:02:49 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-06-23 16:02:49 +0000 |
| commit | b0a2c54fe841545d21e79b5bb559cc2dc9d3353f (patch) | |
| tree | 0db0c296bb59660d9872fed0f41aef9bf4767b15 /csi.c | |
| parent | csi/vt: fix logging of intermediate characters (diff) | |
vt: wip: implement scrolling region
This is largely untested, but existing scrolling code has been
converted to using a terminal-global scrolling region that is defined
as start-end of the scrollable region.
This is compared to the old code where the scrolling region where
defined in terms of marginals, counted in lines from top and from
bottom.
Diffstat (limited to 'csi.c')
| -rw-r--r-- | csi.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -380,6 +380,21 @@ csi_dispatch(struct terminal *term, uint8_t final) break; } + case 'r': { + int start = term->vt.params.idx > 0 ? term->vt.params.v[0].value : 1; + int end = term->vt.params.idx > 1 + ? term->vt.params.v[1].value : term->grid.rows; + + /* 1-based */ + term->grid.scrolling_region.start = start - 1; + term->grid.scrolling_region.end = end - 1; + + tll_free(term->grid.damage); + grid_damage_update(&term->grid, 0, term->grid.rows * term->grid.cols); + grid_cursor_to(&term->grid, 0, 0); + break; + } + case 't': /* * TODO: xterm's terminfo specifies *both* \e[?1049h *and* |
