1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

clear_line(): replace size check with a resize.

Turns out that my assertion that term->cols == line->cols can
sometimes fail, because if the window is shrunk, scrlineptr()
deliberately _doesn't_ shrink the line (so that the columns on the
right can be recovered if the window is then resized larger again). So
clear_line() should _make_ the line the right width, instead of
asserting that it already is.
This commit is contained in:
Simon Tatham 2019-03-10 18:31:46 +00:00
parent 5ca340cf1d
commit e4e309e5a4

View File

@ -2110,7 +2110,7 @@ static void check_selection(Terminal *term, pos from, pos to)
static void clear_line(Terminal *term, termline *line)
{
assert(term->cols == line->cols);
resizeline(term, line, term->cols);
for (int i = 0; i < term->cols; i++)
copy_termchar(line, i, &term->erase_char);
line->lattr = LATTR_NORM;