AmendHub

Download:

jcs

/

subtext

/

amendments

/

307

ansi: Still run through args for non-vt100/52, do backspace with \b

\b is ASCII 8, \10 in octal

jcs made amendment 307 about 1 year ago
--- ansi.c Sun Feb 5 09:34:46 2023 +++ ansi.c Wed Feb 22 22:44:10 2023 @@ -54,9 +54,6 @@ ansi(struct session *s, ...) char *ansi_out; va_list ap; short attr, val, val2, len, n; - - if (!s->vt100 && !s->vt52) - return ""; ansi_out = (char *)&ansi_buf[last_ansi_buf]; if (++last_ansi_buf >= nitems(ansi_buf)) @@ -105,6 +102,8 @@ ansi(struct session *s, ...) len = strlcat(ansi_out, "\33[D \33[D", sizeof(ansi_buf[0])); else if (s->vt52) len = strlcat(ansi_out, "\33D \33D", sizeof(ansi_buf[0])); + else + len = strlcat(ansi_out, "\10 \10", sizeof(ansi_buf[0])); break; /* these require N args */