scrolling: hopefully fix bad damage update of items outside scrolling region

This commit is contained in:
Daniel Eklöf 2019-07-03 14:15:23 +02:00
parent 5e8c75aa38
commit 70743fddf4
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -240,8 +240,8 @@ term_scroll_partial(struct terminal *term, struct scroll_region region, int rows
int start = it->item.range.start - term->grid->offset;
int end __attribute__((unused)) = start + it->item.range.length;
if (start < region.start) {
assert(end <= region.start);
if (start < region.start * term->cols) {
assert(end <= region.start * term->cols);
it->item.range.start += rows * term->cols;
}
}
@ -259,8 +259,8 @@ term_scroll_partial(struct terminal *term, struct scroll_region region, int rows
int start = it->item.range.start - term->grid->offset;
int end = start + it->item.range.length;
if (end > region.end) {
assert(start >= region.end);
if (end > region.end * term->cols) {
assert(start >= region.end * term->cols);
it->item.range.start += rows * term->cols;
}
}