X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=terminal.c;h=c79944cda889cb8822be342b4557bebc38de85a9;hb=ca8876f0044c2eb7dbc5a61a432e799973e7e51c;hp=c5fdeeb0245643a3c9584211f7664505e9b23761;hpb=8fdeb3a95cc3d7dce5629fc22e309eb3c996f44d;p=PuTTY.git diff --git a/terminal.c b/terminal.c index c5fdeeb0..c79944cd 100644 --- a/terminal.c +++ b/terminal.c @@ -1403,6 +1403,7 @@ void term_copy_stuff_from_conf(Terminal *term) term->no_remote_charset = conf_get_int(term->conf, CONF_no_remote_charset); term->no_remote_resize = conf_get_int(term->conf, CONF_no_remote_resize); term->no_remote_wintitle = conf_get_int(term->conf, CONF_no_remote_wintitle); + term->no_remote_clearscroll = conf_get_int(term->conf, CONF_no_remote_clearscroll); term->rawcnp = conf_get_int(term->conf, CONF_rawcnp); term->rect_select = conf_get_int(term->conf, CONF_rect_select); term->remote_qtitle_action = conf_get_int(term->conf, CONF_remote_qtitle_action); @@ -3606,7 +3607,8 @@ static void term_out(Terminal *term) if (i == 3) { /* Erase Saved Lines (xterm) * This follows Thomas Dickey's xterm. */ - term_clrsb(term); + if (!term->no_remote_clearscroll) + term_clrsb(term); } else { i++; if (i > 3) @@ -4725,7 +4727,7 @@ static void term_out(Terminal *term) } term_print_flush(term); - if (term->logflush) + if (term->logflush && term->logctx) logflush(term->logctx); } @@ -5445,7 +5447,7 @@ typedef struct { static void clip_addchar(clip_workbuf *b, wchar_t chr, int attr) { if (b->bufpos >= b->buflen) { - b->buflen += 128; + b->buflen *= 2; b->textbuf = sresize(b->textbuf, b->buflen, wchar_t); b->textptr = b->textbuf + b->bufpos; b->attrbuf = sresize(b->attrbuf, b->buflen, int); @@ -6374,6 +6376,8 @@ char *term_get_ttymode(Terminal *term, const char *mode) const char *val = NULL; if (strcmp(mode, "ERASE") == 0) { val = term->bksp_is_delete ? "^?" : "^H"; + } else if (strcmp(mode, "IUTF8") == 0) { + val = frontend_is_utf8(term->frontend) ? "yes" : "no"; } /* FIXME: perhaps we should set ONLCR based on lfhascr as well? */ /* FIXME: or ECHO and friends based on local echo state? */