term->erase_char = term->basic_erase_char;
term->alt_which = 0;
term_print_finish(term);
+ term->xterm_mouse = FALSE;
+ set_raw_mouse_mode(term->frontend, FALSE);
{
int i;
for (i = 0; i < 256; i++)
term->vt52_mode = FALSE;
term->cr_lf_return = FALSE;
term->seen_disp_event = FALSE;
- term->xterm_mouse = term->mouse_is_down = FALSE;
+ term->mouse_is_down = FALSE;
term->reset_132 = FALSE;
term->cblinker = term->tblinker = 0;
term->has_focus = 1;
{
term->resize_fn = resize_fn;
term->resize_ctx = resize_ctx;
- if (term->cols > 0 && term->rows > 0)
+ if (resize_fn && term->cols > 0 && term->rows > 0)
resize_fn(resize_ctx, term->cols, term->rows);
}
term->wrapnext = FALSE;
seen_disp_event(term);
term->paste_hold = 0;
+
+ if (term->cfg.crhaslf) {
+ if (term->curs.y == term->marg_b)
+ scroll(term, term->marg_t, term->marg_b, 1, TRUE);
+ else if (term->curs.y < term->rows - 1)
+ term->curs.y++;
+ }
if (term->logctx)
logtraffic(term->logctx, (unsigned char) c, LGTYP_ASCII);
break;
val = term->cfg.bksp_is_delete ? "^?" : "^H";
}
/* FIXME: perhaps we should set ONLCR based on cfg.lfhascr as well? */
+ /* FIXME: or ECHO and friends based on local echo state? */
return dupstr(val);
}
*/
{
int i;
- for (i = 0; i < p->n_prompts; i++)
+ for (i = 0; i < (int)p->n_prompts; i++)
memset(p->prompts[i]->result, 0, p->prompts[i]->result_len);
}
}