}
/* We assume that we don't screw up and retrieve something out of range. */
+ if (line != NULL) {
+ fatalbox("line==NULL in terminal.c\n"
+ "lineno=%d y=%d w=%d h=%d\n"
+ "count(scrollback=%p)=%d\n"
+ "count(screen=%p)=%d\n"
+ "count(alt=%p)=%d alt_sblines=%d\n"
+ "whichtree=%p treeindex=%d\n\n"
+ "Please contact <putty@projects.tartarus.org> "
+ "and pass on the above information.",
+ lineno, y, term->cols, term->rows,
+ term->scrollback, count234(term->scrollback),
+ term->screen, count234(term->screen),
+ term->alt_screen, count234(term->alt_screen), term->alt_sblines,
+ whichtree, treeindex);
+ }
assert(line != NULL);
resizeline(term, line, term->cols);
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);
}
}
}
- /* 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. */
if ((c & ~0x1F) == 0 && term->termstate < DO_CTRLS) {
switch (c) {
case '\005': /* ENQ: terminal type query */
- /* Strictly speaking this is VT100 but a VT100 defaults to
+ /*
+ * Strictly speaking this is VT100 but a VT100 defaults to
* no response. Other terminals respond at their option.
*
* Don't put a CR in the default string as this tends to
* upset some weird software.
- *
- * An xterm returns "xterm" (5 characters)
*/
compatibility(ANSIMIN);
if (term->ldisc) {
case 95:
case 96:
case 97:
- /* xterm-style bright foreground */
+ /* aixterm-style bright foreground */
term->curr_attr &= ~ATTR_FGMASK;
term->curr_attr |=
((term->esc_args[i] - 90 + 8)
case 105:
case 106:
case 107:
- /* xterm-style bright background */
+ /* aixterm-style bright background */
term->curr_attr &= ~ATTR_BGMASK;
term->curr_attr |=
((term->esc_args[i] - 100 + 8)
}
}
break;
- case 'Z': /* CBT: BackTab for xterm */
+ case 'Z': /* CBT */
compatibility(OTHER);
{
int i = def(term->esc_args[0], 1);
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;
}
}
}
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;
}