RDB's patch: ^U sends Telnet Erase Line; line ending is now \r or \r\n
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 17 Mar 2000 10:31:14 +0000 (10:31 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 17 Mar 2000 10:31:14 +0000 (10:31 +0000)
depending on protocol, so local ldisc works with ssh

git-svn-id: svn://svn.tartarus.org/sgt/putty@417 cda61777-01e9-0310-a592-d414129be87e

ldisc.c

diff --git a/ldisc.c b/ldisc.c
index 4f1b913..dda7cc3 100644 (file)
--- a/ldisc.c
+++ b/ldisc.c
@@ -98,6 +98,7 @@ static void term_send(char *buf, int len) {
                bsb(plen(term_buf[term_buflen-1]));
                term_buflen--;
            }
+           back->special (TS_EL);
            if( c == CTRL('C') )  back->special (TS_IP);
            if( c == CTRL('Z') )  back->special (TS_SUSP);
            if( c == CTRL('\\') ) back->special (TS_ABORT);
@@ -123,7 +124,10 @@ static void term_send(char *buf, int len) {
            break;
          case CTRL('M'):              /* send with newline */
            back->send(term_buf, term_buflen);
-           back->send("\r\n", 2);
+           if (cfg.protocol == PROT_RAW)
+               back->send("\r\n", 2);
+           else
+               back->send("\r", 1);
            c_write("\r\n", 2);
            term_buflen = 0;
            break;