Xinqi Bao's Git
projects
/
st.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Simplify techo
[st.git]
/
st.c
diff --git
a/st.c
b/st.c
index
df660ff
..
e510565
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-2318,10
+2318,7
@@
techo(char *buf, int len) {
for(; len > 0; buf++, len--) {
char c = *buf;
for(; len > 0; buf++, len--) {
char c = *buf;
- if(c == '\033') { /* escape */
- tputc("^", 1);
- tputc("[", 1);
- } else if(c < '\x20') { /* control code */
+ if(c < '\x20') { /* control code */
if(c != '\n' && c != '\r' && c != '\t') {
c |= '\x40';
tputc("^", 1);
if(c != '\n' && c != '\r' && c != '\t') {
c |= '\x40';
tputc("^", 1);