Browse Source

End a sequence only on CAN, SUB, \a and C1s.

master
Colona 11 years ago
committed by Roberto E. Vargas Caballero
parent
commit
e31829f659
1 changed files with 8 additions and 6 deletions
  1. +8
    -6
      st.c

+ 8
- 6
st.c View File

@ -2335,19 +2335,19 @@ tcontrolcode(uchar ascii) {
switch(ascii) { switch(ascii) {
case '\t': /* HT */ case '\t': /* HT */
tputtab(1); tputtab(1);
break;
return;
case '\b': /* BS */ case '\b': /* BS */
tmoveto(term.c.x-1, term.c.y); tmoveto(term.c.x-1, term.c.y);
break;
return;
case '\r': /* CR */ case '\r': /* CR */
tmoveto(0, term.c.y); tmoveto(0, term.c.y);
break;
return;
case '\f': /* LF */ case '\f': /* LF */
case '\v': /* VT */ case '\v': /* VT */
case '\n': /* LF */ case '\n': /* LF */
/* go to first col if the mode is set */ /* go to first col if the mode is set */
tnewline(IS_SET(MODE_CRLF)); tnewline(IS_SET(MODE_CRLF));
break;
return;
case '\a': /* BEL */ case '\a': /* BEL */
if(term.esc & ESC_STR_END) { if(term.esc & ESC_STR_END) {
/* backwards compatibility to xterm */ /* backwards compatibility to xterm */
@ -2366,10 +2366,10 @@ tcontrolcode(uchar ascii) {
return; return;
case '\016': /* SO */ case '\016': /* SO */
term.charset = 0; term.charset = 0;
break;
return;
case '\017': /* SI */ case '\017': /* SI */
term.charset = 1; term.charset = 1;
break;
return;
case '\032': /* SUB */ case '\032': /* SUB */
tsetchar(question, &term.c.attr, term.c.x, term.c.y); tsetchar(question, &term.c.attr, term.c.x, term.c.y);
case '\030': /* CAN */ case '\030': /* CAN */
@ -2380,6 +2380,7 @@ tcontrolcode(uchar ascii) {
case '\021': /* XON (IGNORED) */ case '\021': /* XON (IGNORED) */
case '\023': /* XOFF (IGNORED) */ case '\023': /* XOFF (IGNORED) */
case 0177: /* DEL (IGNORED) */ case 0177: /* DEL (IGNORED) */
return;
case 0x84: /* TODO: IND */ case 0x84: /* TODO: IND */
case 0x85: /* TODO: NEL */ case 0x85: /* TODO: NEL */
case 0x88: /* TODO: HTS */ case 0x88: /* TODO: HTS */
@ -2396,6 +2397,7 @@ tcontrolcode(uchar ascii) {
case 0x9f: /* TODO: APC */ case 0x9f: /* TODO: APC */
break; break;
} }
/* only CAN, SUB, \a and C1 chars interrupt a sequence */
term.esc &= ~(ESC_STR_END|ESC_STR); term.esc &= ~(ESC_STR_END|ESC_STR);
return; return;
} }


Loading…
Cancel
Save