X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/8ce72d2c1c7651def2425be607ef623e6b0b9bd2..5bc238bbefc16c6d86a914aa5baa51d34acb20b3:/window.c diff --git a/window.c b/window.c index dd1365ce..a636ac5d 100644 --- a/window.c +++ b/window.c @@ -181,7 +181,10 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { } back = (cfg.protocol == PROT_SSH ? &ssh_backend : - cfg.protocol == PROT_TELNET ? &telnet_backend : &raw_backend ); + cfg.protocol == PROT_TELNET ? &telnet_backend : + &raw_backend); + + ldisc = (cfg.ldisc_term ? &ldisc_term : &ldisc_simple); if (!prev) { wndclass.style = 0; @@ -1016,7 +1019,7 @@ static int WINAPI WndProc (HWND hwnd, UINT message, len = TranslateKey (wParam, lParam, buf); if (len == -1) return DefWindowProc (hwnd, message, wParam, lParam); - back->send (buf, len); + ldisc->send (buf, len); } return 0; case WM_KEYUP: @@ -1056,7 +1059,7 @@ static int WINAPI WndProc (HWND hwnd, UINT message, */ { char c = xlat_kbd2tty((unsigned char)wParam); - back->send (&c, 1); + ldisc->send (&c, 1); } return 0; }