mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-21 05:33:45 -04:00
csi: scroll region is not allowed past available rows
This commit is contained in:
parent
d63629b370
commit
abff0e205e
1 changed files with 1 additions and 1 deletions
2
csi.c
2
csi.c
|
|
@ -497,7 +497,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
||||||
|
|
||||||
case 'r': {
|
case 'r': {
|
||||||
int start = param_get(term, 0, 1);
|
int start = param_get(term, 0, 1);
|
||||||
int end = param_get(term, 1, term->rows);
|
int end = min(param_get(term, 1, term->rows), term->rows);
|
||||||
|
|
||||||
/* 1-based */
|
/* 1-based */
|
||||||
term->scroll_region.start = start - 1;
|
term->scroll_region.start = start - 1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue