The invisible padding during width reduction is not cleared as we clear
it when it gets visible again. However, if the line is pushed into
scrollback in between, it may get visible once the width is increases
again. Hence, clear padding of main-lines if screen-width is decreased.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
- /* clear expansion area */
+ /* clear expansion/padding area */
for (j = 0; j < con->line_num; ++j) {
i = 0;
if (j < con->size_y)
i = con->size_x;
for (j = 0; j < con->line_num; ++j) {
i = 0;
if (j < con->size_y)
i = con->size_x;
+ /* main-lines may go into SB, so clear all cells */
+ for ( ; i < con->main_lines[j]->size; ++i)
cell_init(con, &con->main_lines[j]->cells[i]);
i = 0;
if (j < con->size_y)
i = con->size_x;
cell_init(con, &con->main_lines[j]->cells[i]);
i = 0;
if (j < con->size_y)
i = con->size_x;
+ /* alt-lines never go into SB, only clear visible cells */
for ( ; i < x; ++i)
cell_init(con, &con->alt_lines[j]->cells[i]);
}
for ( ; i < x; ++i)
cell_init(con, &con->alt_lines[j]->cells[i]);
}