Fix DECCARA in non-rectangular mode for a single line
This commit is contained in:
parent
d19f28f2b4
commit
0f59a2d543
@ -784,6 +784,12 @@ select_graphic_rendition(Screen *self, int *params, unsigned int count, Region *
|
||||
}
|
||||
} else {
|
||||
index_type x, num;
|
||||
if (region.top == region.bottom) {
|
||||
linebuf_init_line(self->linebuf, region.top);
|
||||
x = MIN(region.left, self->columns-1);
|
||||
num = MIN(self->columns - x, region.right - x + 1);
|
||||
apply_sgr_to_cells(self->linebuf->line->gpu_cells + x, num, params, count);
|
||||
} else {
|
||||
for (index_type y = region.top; y < MIN(region.bottom + 1, self->lines); y++) {
|
||||
if (y == region.top) { x = MIN(region.left, self->columns - 1); num = self->columns - x; }
|
||||
else if (y == region.bottom) { x = 0; num = MIN(region.right + 1, self->columns); }
|
||||
@ -792,6 +798,7 @@ select_graphic_rendition(Screen *self, int *params, unsigned int count, Region *
|
||||
apply_sgr_to_cells(self->linebuf->line->gpu_cells + x, num, params, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else cursor_from_sgr(self->cursor, params, count);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user