X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/d45d4c0758f73ebcc761afbda3b229d2ca11099e..4320baf72ee1b9890be0ca6315161d4f4d026cfd:/terminal.c diff --git a/terminal.c b/terminal.c index dfd9a19e..432ed936 100644 --- a/terminal.c +++ b/terminal.c @@ -6265,3 +6265,17 @@ void term_set_focus(Terminal *term, int has_focus) term->has_focus = has_focus; term_schedule_cblink(term); } + +/* + * Provide "auto" settings for remote tty modes, suitable for an + * application with a terminal window. + */ +char *term_get_ttymode(Terminal *term, const char *mode) +{ + char *val = NULL; + if (strcmp(mode, "ERASE") == 0) { + val = term->cfg.bksp_is_delete ? "^?" : "^H"; + } + /* FIXME: perhaps we should set ONLCR based on cfg.lfhascr as well? */ + return dupstr(val); +}