X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/ca2d59436752b1d46a12d4d4fabd366fac81b0ca..8df7a775f6f8b0f81f84eafe28cd0bb8d4c6d1f4:/terminal.c diff --git a/terminal.c b/terminal.c index c1fef2a1..12ad1e9c 100644 --- a/terminal.c +++ b/terminal.c @@ -1,11 +1,4 @@ #include -#ifndef AUTO_WINSOCK -#ifdef WINSOCK_TWO -#include -#else -#include -#endif -#endif #include #include @@ -2150,7 +2143,7 @@ void term_nopaste() { } void term_paste() { -static long last_paste = 0; + static long last_paste = 0; long now, paste_diff; if(paste_len == 0) return; @@ -2166,10 +2159,15 @@ static long last_paste = 0; while(paste_possend (&c, 1); + int n = 0; + while (n + paste_pos < paste_len) { + if (paste_buffer[paste_pos + n++] == '\r') + break; + } + ldisc->send (paste_buffer+paste_pos, n); + paste_pos += n; - if (c =='\r') { + if (paste_pos < paste_len) { paste_hold = 1; return; }