X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/fd59420de626ce8af54dd90cf4ae37570793c9d1..d46a9154e9a0e15f9e4561a1f7f563e21f211208:/terminal.c diff --git a/terminal.c b/terminal.c index ea5f503f..1e605685 100644 --- a/terminal.c +++ b/terminal.c @@ -1955,27 +1955,27 @@ static void scroll_display(Terminal *term, int topline, int botline, int lines) if (lines > 0) { for (i = 0; i < nlines; i++) for (j = 0; j < term->cols; j++) - copy_termchar(term->disptext[start+i], j, - term->disptext[start+i+distance]->chars+j); + copy_termchar(term->disptext[i], j, + term->disptext[i+distance]->chars+j); if (term->dispcursy >= 0 && term->dispcursy >= topline + distance && term->dispcursy < topline + distance + nlines) term->dispcursy -= distance; for (i = 0; i < distance; i++) for (j = 0; j < term->cols; j++) - term->disptext[start+nlines+i]->chars[j].attr |= ATTR_INVALID; + term->disptext[nlines+i]->chars[j].attr |= ATTR_INVALID; } else { for (i = nlines; i-- ;) for (j = 0; j < term->cols; j++) - copy_termchar(term->disptext[start+i+distance], j, - term->disptext[start+i]->chars+j); + copy_termchar(term->disptext[i+distance], j, + term->disptext[i]->chars+j); if (term->dispcursy >= 0 && term->dispcursy >= topline && term->dispcursy < topline + nlines) term->dispcursy += distance; for (i = 0; i < distance; i++) for (j = 0; j < term->cols; j++) - term->disptext[start+i]->chars[j].attr |= ATTR_INVALID; + term->disptext[i]->chars[j].attr |= ATTR_INVALID; } save_scroll(term, topline, botline, lines); } @@ -2608,12 +2608,19 @@ static void term_out(Terminal *term) } } - /* How about C1 controls ? */ + /* + * How about C1 controls? + * Explicitly ignore SCI (0x9a), which we don't translate to DECID. + */ if ((c & -32) == 0x80 && term->termstate < DO_CTRLS && !term->vt52_mode && has_compat(VT220)) { - term->termstate = SEEN_ESC; - term->esc_query = FALSE; - c = '@' + (c & 0x1F); + if (c == 0x9a) + c = 0; + else { + term->termstate = SEEN_ESC; + term->esc_query = FALSE; + c = '@' + (c & 0x1F); + } } /* Or the GL control. */ @@ -4830,12 +4837,11 @@ static void do_paint(Terminal *term, Context ctx, int may_optimise) if (break_run) { if ((dirty_run || last_run_dirty) && ccount > 0) { + do_text(ctx, start, i, ch, ccount, attr, + ldata->lattr); if (attr & (TATTR_ACTCURS | TATTR_PASCURS)) - do_cursor(ctx, our_curs_x, i, ch, ccount, attr, + do_cursor(ctx, start, i, ch, ccount, attr, ldata->lattr); - else - do_text(ctx, start, i, ch, ccount, attr, - ldata->lattr); updated_line = 1; } @@ -4917,12 +4923,11 @@ static void do_paint(Terminal *term, Context ctx, int may_optimise) } } if (dirty_run && ccount > 0) { + do_text(ctx, start, i, ch, ccount, attr, + ldata->lattr); if (attr & (TATTR_ACTCURS | TATTR_PASCURS)) - do_cursor(ctx, our_curs_x, i, ch, ccount, attr, + do_cursor(ctx, start, i, ch, ccount, attr, ldata->lattr); - else - do_text(ctx, start, i, ch, ccount, attr, - ldata->lattr); updated_line = 1; }