X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=terminal.c;h=0218c0983839ccdeb2d68171e0d99c93f1b9c284;hb=55b8c21f0fdc18f2cc5720e5791f3ede9352efbe;hp=4d0e66e76353f84773b2a2e9fa26f7b2c8e9b5f9;hpb=9a5b63aa03804f6dd90e88fe2fe873a41584c518;p=PuTTY.git diff --git a/terminal.c b/terminal.c index 4d0e66e7..0218c098 100644 --- a/terminal.c +++ b/terminal.c @@ -577,7 +577,7 @@ void term_out(void) { do_toplevel: switch (c) { case '\005': /* terminal type query */ - back->send ("\033[?1;2c", 7); + ldisc->send ("\033[?1;2c", 7); break; case '\007': beep(); @@ -665,7 +665,7 @@ void term_out(void) { if (insert) insch (1); check_selection (cpos, cpos+1); - *cpos++ = c | curr_attr | + *cpos++ = xlat_tty2scr((unsigned char)c) | curr_attr | (c <= 0x7F ? cset_attr[cset] : ATTR_ASCII); curs_x++; if (curs_x == cols) { @@ -766,7 +766,7 @@ void term_out(void) { must_update = TRUE; break; case 'Z': /* terminal type query */ - back->send ("\033[?6c", 5); + ldisc->send ("\033[?6c", 5); break; case 'c': /* restore power-on settings */ power_on(); @@ -902,13 +902,13 @@ void term_out(void) { must_update = TRUE; break; case 'c': /* terminal type query */ - back->send ("\033[?6c", 5); + ldisc->send ("\033[?6c", 5); break; case 'n': /* cursor position query */ if (esc_args[0] == 6) { char buf[32]; sprintf (buf, "\033[%d;%dR", curs_y + 1, curs_x + 1); - back->send (buf, strlen(buf)); + ldisc->send (buf, strlen(buf)); } break; case 'h': /* toggle a mode to high */ @@ -929,7 +929,7 @@ void term_out(void) { } break; case 'r': /* set scroll margins */ - if (esc_nargs <= 2) { + if (!esc_query && esc_nargs <= 2) { int top, bot; top = def(esc_args[0], 1) - 1; if (top < 0) @@ -1031,7 +1031,7 @@ void term_out(void) { if (i == 0 || i == 1) { strcpy (buf, "\033[2;1;1;112;112;1;0x"); buf[2] += i; - back->send (buf, 20); + ldisc->send (buf, 20); } } break; @@ -1436,10 +1436,20 @@ void term_mouse (Mouse_Button b, Mouse_Action a, int x, int y) { !(p <= data+len-sizeof(sel_nl) && !memcmp(p, sel_nl, sizeof(sel_nl)))) p++; - back->send (q, p-q); + + { + int i; + unsigned char c; + for(i=0;isend(&c,1); + } + } + if (p <= data+len-sizeof(sel_nl) && !memcmp(p, sel_nl, sizeof(sel_nl))) { - back->send ("\r", 1); + ldisc->send ("\r", 1); p += sizeof(sel_nl); } q = p;