csi: scroll region is not allowed past available rows

This commit is contained in:
Daniel Eklöf 2019-07-07 17:03:22 +02:00
parent d63629b370
commit abff0e205e
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

2
csi.c
View file

@ -497,7 +497,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
case 'r': {
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 */
term->scroll_region.start = start - 1;